| Oracle9i SQL Reference Release 1 (9.0.1) Part Number A90125-01 |
|
SQL Statements:
DROP SEQUENCE to ROLLBACK, 4 of 20
Use the DROP TABLE statement to remove a table or an object table and all its data from the database.
Dropping a table invalidates the table's dependent objects and removes object privileges on the table. If you want to re-create the table, you must regrant object privileges on the table, re-create the table's indexes, integrity constraints, and triggers, and respecify its storage parameters. Truncating has none of these effects. Therefore, removing rows with the TRUNCATE statement can be more efficient than dropping and re-creating a table.
|
See Also:
|
The table must be in your own schema or you must have the DROP ANY TABLE system privilege.
drop_table::=
drop_table
Specify the schema containing the table. If you omit schema, Oracle assumes the table is in your own schema.
Specify the name of the table, object table, or index-organized table to be dropped. Oracle automatically performs the following operations:
FORCE clause and removes any user-defined statistics collected with the statistics type.
ASSOCIATE STATISTICS and DISASSOCIATE STATISTICS for more information on statistics type associations
See Also:
To drop a cluster and all its the tables, use the
Note:
DROP CLUSTER statement with the INCLUDING TABLES clause to avoid dropping each table individually. See DROP CLUSTER.
INSERT refresh information associated with the table.
Restriction: You cannot directly drop the storage table of a nested table. Instead, you must drop the nested table column using the ALTER TABLE ... DROP COLUMN clause.
Specify CASCADE CONSTRAINTS to drop all referential integrity constraints that refer to primary and unique keys in the dropped table. If you omit this clause, and such referential integrity constraints exist, Oracle returns an error and does not drop the table.
DROP TABLE Example
The following statement drops the oe.orders table.
DROP TABLE oe.orders;
|
|
![]() Copyright © 1996-2001, Oracle Corporation. All Rights Reserved. |
|