Beruflich Dokumente
Kultur Dokumente
Cost
Oracle
MySQL
Free to download
$500 for a commercial license + optional $1,500$62,000 for different levels of support
Oracle Features
Administrative Alerts
Capacity Planning
Query Optimizer
MySQL Features
Differences in syntax
http://troels.arvin.dk/db/rdbms/
Not all databases use the same SQL syntax
Example: Returning the first 5 rows of a query
MySQL
Select columns
FROM tablename
ORDER BY key ASC
LIMIT 5;
Oracle
Select * FROM (
SELECT columns
FROM tablename
ORDER BY key ASC
) WHERE ROWNUM <= 5;
Timestamps
MySQL
Create a field of type TIMESTAMP and enter an invalid date. In this case February 29 2003.
mysql> insert into tester values ('2003-02-29 00:05:00');
Query OK, 1 row affected (0.07 sec)
Notice that MySQL doesn't complain about the date.
Checking to see what MySQL enters you see that it just changed the date to the first day in March.
mysql> select * from tester;
+----------------+
| time
|
+----------------+
| 20030301000500 |
+----------------+
1 row in set (0.00 sec)
Timestamps
Oracle
This will work,
INSERT INTO tablename (columnname)
VALUES (TIMESTAMP'2003-02-28 00:05:00')
while this will fail:
INSERT INTO tablename (columnname)
VALUES (TIMESTAMP'2003-02-29 00:05:00')
Concatenation
Which is better?
MySQL
Oracle