*** DRAFT ***
DROP TABLE

drop-table-stmt:

DROP TABLE IF EXISTS schema-name . table-name

R-01463-03846:[The DROP TABLE statement removes a table added with the CREATE TABLE statement. ] The name specified is the table name. R-40197-14811:[The dropped table is completely removed from the database schema and the disk file. ] The table can not be recovered. R-33950-57093:[All indices and triggers associated with the table are also deleted. ]

R-57089-01510:[The optional IF EXISTS clause suppresses the error that would normally result if the table does not exist. ]

R-17535-15185:[If foreign key constraints are enabled, a DROP TABLE command performs an implicit DELETE FROM command before removing the table from the database schema. ] R-48044-29703:[Any triggers attached to the table are dropped from the database schema before the implicit DELETE FROM is executed, so this cannot cause any triggers to fire. ] By contrast, R-56522-34239:[an implicit DELETE FROM does cause any configured foreign key actions to take place. ] R-26266-37313:[If the implicit DELETE FROM executed as part of a DROP TABLE command violates any immediate foreign key constraints, an error is returned and the table is not dropped. ] R-25359-61571:[If the implicit DELETE FROM causes any deferred foreign key constraints to be violated, and the violations still exist when the transaction is committed, an error is returned at the time of commit. ]

This page last modified on 2022-01-08 05:02:57 UTC

*** DRAFT ***