DROP TABLE Statement
The drop table statement removes the specified table and all its associated indexes from the database.
Syntax
drop_table_statement ::= DROP TABLE [IF EXISTS] name_path
Semantics
Example 5-18 Drop Table
CREATE TABLE DROPTEST (id INTEGER, name STRING, PRIMARY KEY(id))
DROP TABLE DROPTEST
You cannot drop a parent table if there are child tables to it. To drop a
parent table, first drop all of its child tables. Otherwise, the DROP statement results
in an error as shown
below.
drop table users
Output: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