delete table

Examples


The delete table statement removes the named table from the operating system when the Pervasive.SQL or c-tree Plus database types are used. When a SQL database type is used, this statement either clears the data in a table and leaves the table structure intact, or removes the named table from the database entirely.

Syntax

delete table table_name

Parameters

table_name The name of the table to be deleted.

Comments

To use this statement, the table to be deleted must be opened by an open table command that includes the exclusive keyword.

This statement closes the named table before deleting it. The table is closed even if an error causes the table not to be deleted. Since you won’t be notified of an error automatically, we recommend you use the err() function to find out whether an error occurred.

When the SQL database type is used, the entire table is removed from the database, unless the Table_SetDeleteOptions() function or the SQLDropTableOnDelete defaults file setting is used to change this functionality. If either the function or the defaults file setting is set to false, the delete table statement will remove the data from the named table, but leave the table structure intact in the database.

For applications using the SQL database type, Dexterity respects the access rights assigned to a table by the database administrator. If a user is granted read/write access only, Dexterity will return an error code if he or she attempts to use the delete table statement, since the user doesn’t have delete authority.


Documentation Feedback