Göm menyn

TDDD12 Databasteknik (6 ECTS)

Differences between Standard SQL and MySQL

Paragraph numbers are taken from the 5th edition of Elmasri, Navathe. Fundamentals of Database Systems. Pearson/Addison Wesley. 2007.
§8.4.4 Tables as Sets in SQL
MySQL supports only the UNION operand. EXCEPT/MINUS or INTERSECT are not supported.
§8.5.2 Multiset Comparison
The ANY, SOME, ALL keyword do not exist. The query at the bottom of p. 258 would have to be reformulated to:
select lname, fname from emp where salary > (select max(salary) from enemp where dno = 5);
§8.5.2 Multiset Comparison
Neither CONTAINS nor UNIQUE exist in MySQL.
§8.5.6 Joined Tables in SQL and Outer Joins
The renaming feature in Q1B using NATURAL JOIN ... AS is not possible.
§8.7 Specifying Constraints as Assertions and Triggers
Assertions are not possible in MySQL, also CHECK constraints are only parsed but not enforced. That is, you can write a check constraint but it does not take effect.
You can only write triggers on MySQL servers with a version greater than 5.1.16, unless you run on your own MySQL engine as a super user.


    Sidansvarig: Olaf Hartig
    Senast uppdaterad: 2008-03-10