DROP TABLE Command

Switch View :
ScriptFree
Visual FoxPro 9.0 SP2
DROP TABLE Command

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

Reference

ADD TABLE Command
CLOSE Commands
CREATE DATABASE Command
FREE TABLE Command
OPEN DATABASE Command

Other Resources

Commands (Visual FoxPro)
Language Reference (Visual FoxPro)