Content
- Tips
Tips
- May not drop table with referential constraints
- Drop something in source OK; problem dropping in referenced table
- Add something in referenced table OK; problem dropping in source
- Foreign keys must reference primary key or other superkeys of the referenced table
UNION
andOR
are not interchangeable;UNION
will discard duplicatesOR
SELECT E.name FROM Employees E, Works_in W WHERE E.employee_id= W.employee_id AND(W.department_id = 1 OR W.department_id = 3)
OR
SELECT E.name FROM Employees E, Works_in W WHERE E.employee_id = W.employee_id AND W.department_id = 1 UNION SELECT E.name FROM Employees E, Works_in W WHERE E.employee_id = W.employee_id AND W.department_id = 3
INTERSECT
=JOIN
,EXCEPT
=NOT IN
UNKNOWN
is like0.5
in comparisons- Assertions are checked every time the table is updated