Skip to content

DROP TABLE

DROP TABLE#

Syntax#

drop_table ::=#

Prerequisites#

Only the SYS user, the owner of the schema containing the table, and users with the DROP ANY TABLE system privilege can execute the DROP TABLE statement.

Description#

This statement is used to remove a table and all of its data from a database.

Set the value of the RECYCLEBIN_ENABLE property to 1 to move a table to the recycle bin, instead of dropping it directly from the database. Tables of the same name can be dropped multiple times; only as many tables as the recycle bin can contain can be moved to the recycle bin.

user_name#

This is used to specify the name of the owner of the table to be dropped. If omitted, Altibase will assume that the table belongs to the schema of the user connected via the current session.

table_name#

This is used to specify the name of the table to be dropped.

{CASCADE | CASCADE CONSTRAINTS}#

These options are used to delete referential integrity constraints in other tables that reference the primary key or unique keys in the table being dropped.

Example#

<Query> Drop the table employees.

iSQL> DROP TABLE employees;
Drop success.