DROP TABLE

From Lianjapedia
Revision as of 11:23, 30 January 2013 by Helen.george (Talk | contribs)

Jump to: navigation, search

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