Oracle9i SQL Reference Release 2 (9.2) Part Number A96540-01 |
|
SQL Statements: DROP SEQUENCE to ROLLBACK, 4 of 19
Use the DROP
TABLE
statement to remove a table or an object table and all its data from the database.
Note: For an external table, this statement removes only the table metadata in the database. It has no affect on the actual data, which resides outside of 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, then 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::=
Specify the schema containing the table. If you omit schema
, then 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:
table
is partitioned, then any corresponding local index partitions are also dropped.table
's nested tables and LOBs.See Also:
Oracle9i Data Cartridge Developer's Guide for more information on these routines |
FORCE
clause and removes any user-defined statistics collected with the statistics type.
See Also:
ASSOCIATE STATISTICS and DISASSOCIATE STATISTICS for more information on statistics type associations |
Note: To drop a cluster and all its the tables, use the |
INSERT
refresh information associated with the table.Restriction on dropping tables: 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, then Oracle returns an error and does not drop the table.
The following statement drops the oe.list_customers
table created in "List Partitioning Example".
DROP TABLE list_customers;
|
Copyright © 1996, 2002 Oracle Corporation. All Rights Reserved. |
|