Difference between revisions of "DROP TABLE"
Yvonne.milne (Talk | contribs) |
Helen.george (Talk | contribs) |
||
Line 15: | Line 15: | ||
You must have ALTER privilege on the table to issue the DROP TABLE command. | You must have ALTER privilege on the table to issue the DROP TABLE command. | ||
− | {| class="wikitable" | + | {| class="wikitable" width=100% |
!Keywords||Description | !Keywords||Description | ||
|- | |- | ||
Line 22: | Line 22: | ||
|table||The name of the table to be dropped. | |table||The name of the table to be dropped. | ||
|- | |- | ||
− | |NODELETE||Remove the table from the database, but do not physically delete the files | + | |valign="top"|NODELETE||Remove the table from the database, but do not physically delete the files |
|- | |- | ||
|} | |} |
Revision as of 13:08, 21 January 2013
Contents
Purpose
Removes a table (and all its data) or a virtualtable from the database
Syntax
DROP TABLE [<database>!]<table> [NODELETE]
See Also
ADATABASES(), ADD TABLE, ALTER INDEX, ALTER TABLE, ALTER VIRTUALTABLE, CLOSE DATABASES, CLOSE TABLES, COMPILE DATABASE, COPY DATABASE, CREATE DATABASE, CREATE TABLE, CREATE INDEX, CREATE VIEW, CREATE VIRTUALTABLE, DATABASE(), DBUSED(), DISPLAY DATABASE, DISPLAY INDEXES, DISPLAY TABLES, DROP INDEX, DROP VIEW, ERASE, GETENV(), LIST DATABASE, LIST INDEXES, LIST TABLES, OPEN DATABASE, PACK DATABASE, REBUILD DATABASE, REINDEX DATABASE, SET AUTOCATALOG, SET EXCLUSIVE, USE, ZAP
Description
The DROP TABLE command removes a table and all its data from the database. When you drop the table, it removes the specified table and its associated index files and frees the disk space that the files occupied.
It is also used to remove a virtualtable from the database.
You must have ALTER privilege on the table to issue the DROP TABLE command.
Keywords | Description |
---|---|
database | The name of the database to which the table belongs. The '!' character must be included between the database name and the table name. |
table | The name of the table to be dropped. |
NODELETE | Remove the table from the database, but do not physically delete the files |
Example
DROP TABLE hr!staff