Switch to: V14V13V12V11V10V9V8V7V6V5

Table of Contents

DROP TABLE

DROP TABLE command allows to delete tables from the database.

Syntax

drop_table_statement
    :    DROP TABLE [IF EXISTS] table_name [ drop_behavior ] 

drop_behavior
    :    CASCADE | RESTRICT

Arguments

[IF EXISTS]

Do not raise error in case there is no table with the specified name.

table_name

The name of table to be deleted.

drop_behavior

CASCADE or RESTRICT parameters define the way of the table deletion influence on the other database objects dependable from the given table.

RESTRICT parameter is used by default. If any database object is linked with the table, the deletion will be finished with an error message and the table won’t be deleted.

CASCADE If any database object is linked with the table, such object will be dropped first. It can cause the avalanche of changes, therefore you should use it carefully.

Examples

DROP TABLE tblPerson;
DROP TABLE IF EXISTS tblPerson;