drop table
Execute DROP TABLE XX statement
The drop table is placed in the Recycle Bin (user_recyclebin) instead of being deleted directly. In this way, the table information in the Recycle Bin can be restored or completely erased.
Retrieve the deleted table information by querying the Recycle Bin User_recyclebin, and then use the statement
Flashback table <user_recyclebin.object_name or user_recyclebin.original_name> to before drop [rename to <new_ table_name>];
Restore the table in the Recycle Bin to the original name or specify a new name, and the data in the table is not lost.
To delete a table completely, use the statement: drop table <table_name> Purge;
Clearing the information in the Recycle Bin
Clear the specified table: Purge table <table_name>;
Clear the current user's Recycle Bin: Purge RecycleBin;
Clear the Recycle Bin for all users: Purge Dba_recyclebin;
Do not put in the Recycle Bin, the direct deletion is: drop table xx purge;
Clearing data in a table
The truncate operation is very similar to the delete operation without a where condition, except that all the information in the table is deleted, but the tables still exist.
Example: Truncate TABLE XX
Truncate does not support rollback and cannot truncate a table with a foreign key, if you want to remove the foreign key first, and then delete it.
After TRUNCATE TABLE, it is possible that the tablespace is still not released and can use the following statement:
ALTER TABLE name deallocate UNUSED KEEP 0;
Note that if you do not add keep 0, the tablespace will not be freed.
For example:
ALTER TABLE F_MINUTE_TD_NET_FHO_B7 deallocate UNUSED KEEP 0;
Or:
TRUNCATE Table (Schema) table_name DROP (reuse) storage to release the tablespace.
For example: Truncate TABLE test1 DROP STORAGE;
Querying the table under the user
If your user rights are not DBA:
Then you use
SELECT * from User_tables;
You can query the tables that are owned by the current user.
If you are a DBA user:
SELECT * from Dba_tables;
The Oracle drop table does not directly delete drop tables xx purge