Oracle® TimesTen In-Memory Database SQL Reference Release 11.2.1 Part Number E13070-03 |
|
|
View PDF |
The DROP TABLE statement deletes the specified table, including any hash indexes and any range indexes associated with it.
Required privilege
No privilege is required for the table owner.
DROP ANY TABLE for another user's table.
SQL syntax
DROP TABLE [Owner.]TableName
Parameters
The DROP TABLE statement has the parameter:
Parameter | Description |
---|---|
[ Owner .] TableName |
Identifies the table to be dropped. |
Description
If you attempt to drop a table that is in use, an error results.
If a DROP TABLE operation is or was active in an uncommitted transaction, other transactions doing DML operations that do not access that table are allowed to proceed.
If the table is a replicated table, you can use the DROP REPLICATION statement to drop the replication scheme before issuing the DROP TABLE statement. You can also use the ALTER REPLICATION statement to drop the table from the replication scheme. Once you drop the table from the replication scheme, you can use the DROP TABLE statement to drop the table.
A temporary table cannot be dropped by a connection if some other connection has some non-empty instance of the table.
Examples
CREATE TABLE vendorperf (ordernumber INTEGER, delivday TT_SMALLINT, delivmonth TT_SMALLINT, delivyear TT_SMALLINT, delivqty TT_SMALLINT, remarks VARCHAR2(60)) CREATE UNIQUE INDEX vendorperfindex ON vendorperf (ordernumber);
The following statement drops the table and index.
DROP TABLE vendorperf ;