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
UNIONandORare not interchangeable;UNIONwill discard duplicatesORSELECT 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)ORSELECT 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 INUNKNOWNis like0.5in comparisons- Assertions are checked every time the table is updated