A Gentle Introduction to

SQL

CREATE and DROP

How to create tables, indexes, views and other things. How to get rid of them.


DROP TABLE problems: Foreign key references.
You may not drop a table if it is referenced by another table.
oracle variations:
The CASCADE CONSTRAINTS clause can be used to remove the references.
DROP TABLE t_a CASCADE CONSTRAINTS

Possible error messages:
Error 2449 ORA-02449: unique/primary keys in table referenced by foreign keys

access
db2
mysql
oracle
postgres
sqlserver