DROP TABLE文
drop table文は、指定された表および関連するすべての索引をデータベースから削除します。
構文
drop_table_statement ::= DROP TABLE [IF EXISTS] name_path
セマンティクス
例5-19 表の削除
CREATE TABLE DROPTEST (id INTEGER, name STRING, PRIMARY KEY(id))
DROP TABLE DROPTEST
親表は、それに子表がある場合は削除できません。親表を削除するには、まずその子表をすべて削除します。そうしないと、次に示すように、DROP文がエラーになります。
drop table users
出力:Error handling command drop table users: Error: User error in query:
DROP TABLE failed for table users:
Cannot remove table users, it is still referenced by child table