15.01.2013 Views

Oracle Database 11g The Complete Reference (Osborne ORACLE ...

Oracle Database 11g The Complete Reference (Osborne ORACLE ...

Oracle Database 11g The Complete Reference (Osborne ORACLE ...

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

DROP TABLE<br />

SEE ALSO ALTER TABLE, CREATE INDEX, CREATE TABLE, DROP CLUSTER, Chapter 17<br />

FORMAT<br />

DROP TABLE [schema.] table [CASCADE CONSTRAINTS] [PURGE] ;<br />

DESCRIPTION DROP TABLE drops the specified table. To drop a table, you must either own the<br />

table or have the DROP ANY TABLE system privilege. Dropping a table also drops indexes and grants<br />

associated with it. Objects built on dropped tables are marked invalid and cease to work.<br />

<strong>The</strong> CASCADE CONSTRAINTS option drops all referential integrity constraints referring to keys in<br />

the dropped table.<br />

You can drop a cluster and all of its tables by using the INCLUDING TABLES clause on DROP<br />

CLUSTER.<br />

Using the DROP TABLE statement moves a table or object table to the recycle bin or removes the<br />

table and all its data from the database entirely. Unless you specify the PURGE clause, the DROP TABLE<br />

statement does not result in space being released back to the tablespace for use by other objects, and the<br />

space continues to count toward the user’s space quota. Objects may be automatically purged from the<br />

recycle bin if the tablespace runs out of space for new objects.<br />

DROP TABLESPACE<br />

SEE ALSO ALTER TABLESPACE, CREATE DATABASE, CREATE TABLESPACE, Chapter 51<br />

FORMAT<br />

DROP TABLESPACE tablespace<br />

[INCLUDING CONTENTS [AND DATAFILES] [CASCADE CONSTRAINTS]];<br />

DESCRIPTION tablespace is the name of the tablespace being dropped. <strong>The</strong> INCLUDING CONTENTS<br />

option allows you to drop a tablespace that contains data. Without INCLUDING CONTENTS, only an<br />

empty tablespace can be dropped. Tablespaces should be offline (see ALTER TABLESPACE) before dropping,<br />

or the drop operation will be prevented if any users are accessing data, index, rollback, or temporary<br />

segments in the tablespace. You must have the DROP TABLESPACE system privilege to use this command.<br />

DROP TRIGGER<br />

SEE ALSO ALTER TRIGGER, CREATE TRIGGER, Chapters 34 and 38<br />

FORMAT<br />

DROP TRIGGER [schema.] trigger;<br />

DESCRIPTION DROP TRIGGER drops the specified trigger. You must either own the trigger or have<br />

the DROP ANY TRIGGER system privilege.<br />

DROP TYPE<br />

SEE ALSO CREATE TYPE, Chapter 38<br />

FORMAT<br />

DROP TYPE [schema.] type_name [ FORCE | VALIDATE ];<br />

DROP TYPE 1129<br />

DESCRIPTION DROP TYPE drops the specification and body of an abstract datatype. You must<br />

either own the type or have the DROP ANY TYPE system privilege. Unless you use FORCE, you cannot<br />

drop a type if a table or other object references it.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!