In Oracle PL/SQL, you can use the following commands to view table details:
To move a table to the recycle bin or remove it entirely from the database, you use the DROP TABLE statement:
DROP TABLE schema_name.table_name
[CASCADE CONSTRAINTS | PURGE];
First, indicate the table and its schema that you want to drop after the
DROP TABLE
clause. If you don’t specify the schema name explicitly, the statement assumes that you are removing the table from your own schema.Second, specify
CASCADE CONSTRAINTS
clause to remove all referential integrity constraints which refer to primary and unique keys in the table. In case such referential integrity constraints exist and you don’t use this clause, Oracle returns an error and stops removing the table.Third, specify
PURGE
clause if you want to drop the table and release the space associated with it at once. By using thePURGE
clause, Oracle will not place the table and its dependent objects into the recycle bin.
What are your thoughts on this post?
I’d love to hear from you! Click this link to email me—I reply to every message!
Also use the share button below if you liked this post. It makes me smile, when I see it.