DROP TABLE Command

JavaScript Editor js editor     Web development 



Main Page

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

DROP TABLE TableName | FileName | ? [RECYCLE]

Return Value

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.

Remarks

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.

See Also



JavaScript Editor js editor     Web development