In Oracle, if you want to delete a user's table data in multiple ways, we recommend a fast method to delete all the table data under the user, you can use plsql to quickly delete a file. The Code is as follows:
Declare
Cursor c_t is (select table_name from user_tables); -- declares a cursor
Table_name user_tables.table_name % type; -- declare a table name variable
Begin
Open c_t;
Loop-loop
Fetch c_t into table_name;
Exit when c_t % notfound;
Execute immediate 'delete from' | table_name; -- delete a dynamic SQL statement
End loop;
Close c_t;
End;
In Oracle, user_tables is a dictionary table that stores information about the user table. You can use a cursor to obtain information about the current user table stored in the dictionary table, then, the data in each table is deleted cyclically. It is very simple. This should be frequently encountered in the development process.
Rlwrap
SQLPLUS spool to dynamic Log File Name
Oracle SQLPLUS prompt settings
Accelerate SQL return by setting SQLPLUS ARRAYSIZE (row prefetch)