sql - Oracle | drop table -


I would like to leave some tables in a tablespace, in which the common name added at the end of each table for an example is: TABLE1_NAME1_COMMON TABLE2_NAME2_COMMON TABLE3_NAME3_COMMON

I have heard of Oracle Functions, but I am not familiar with them, so I expect some help.

Thank you.

If you are fully sure what you are doing, that is, if you are sure Do not accidentally leave a table that you do not want to leave, you can do this: Set the server output on set for 1000000 R (from user_tables Select table_name where the table_name like '% \ _COMMON' escape from '\') the loop executes the 'drop table' immediately || R.table_name; End loop; The exception occurs when others call DBMS_output.pot_line (SKLRM); End;

Edit :

  1. Forms from user_tables to dba_tables In it seems more secure to do.
  2. set to server output to dbms_output.put_line <


Comments