May 2019
Intermediate to advanced
600 pages
20h 46m
English
We'll use the following simple database to understand and investigate them:
CREATE TABLE orders (orderid integer PRIMARY KEY);CREATE TABLE orderlines (orderid integer,lineid smallint,PRIMARY KEY (orderid, lineid));
ALTER TABLE orderlines ADD FOREIGN KEY (orderid)REFERENCES orders (orderid);
DROP TABLE orders;ERROR: cannot drop table orders because other objects depend on itDETAIL: constraint orderlines_orderid_fkey on table orderlines depends on table ordersHINT: Use DROP ... CASCADE to drop the dependent objects too.
Be ...
Read now
Unlock full access