1. Two Ways to delete table data
A. Delete * From my_table;
B. truncate table my_table;
2. Delete the entire table
Drop table my_table;
How can we recover tables accidentally dropped? In fact, Oracle also has a similar "recycle bin"
For example, you accidentally deleted the my_table table.
Drop table my_table;
When you use the SELECT statement to query this table, the system will prompt that the table or view does not exist.
However, you can use the following statement to query that the table is still in the Oracle recycle bin:
Select * From user_recyclebin where original_name = 'my _ table ';
Now, you can use the following statement to restore data:
Flashback table my_table to before drop;
3. How to thoroughly delete a table: Oracle10g has the recycle bin function. When we delete a table, we did not delete the table completely. Instead, we put the table into the recycle bin, and finally there were a bunch of strange table names: bin $ 2cmp4f1_q2cw3lj + bxlytw = $0 The cleanup method is as follows: Purge
TableOrigenal_tablename; Purge index origenal_indexname; To query junk information, use the following SQL statement: Select T. object_name, T. type, T. original_name from user_recyclebin T; The following command is available: Purge recyclebin; It cannot be as complicated as above. Haha! In addition, the method for deleting a table that does not enter recycle is as follows: drop table tablename purge;