Export (0) Print
Expand All
Expand Minimize

DROP TABLE Command

Removes a table from the current database and deletes it from disk.


DROP TABLE TableName | FileName | ? [RECYCLE]

TableName

Specifies the table to remove from the current database and delete from disk.

FileName

Specifies a free table to delete from disk.

?

Displays the Remove dialog from which you can choose a table to remove from the current database and delete from disk.

RECYCLE

Specifies that the table isn't immediately deleted from disk and is placed in the Microsoft Windows Recycle Bin.

When DROP TABLE is issued, all primary indexes, default values, and validation rules associated with the table are also removed. DROP TABLE also affects other tables in the current database if those tables have rules or relations associated with the table being removed. The rules and relations are no longer valid when the table is removed from the database.

Any table deleted with this command cannot be retrieved. Even if SET SAFETY is set to ON, you are not warned before the table is deleted.

Community Additions

ADD
Show:
© 2014 Microsoft