日期:2014-05-17 浏览次数:25795 次
SQL> select table_name from user_tables where table_name like 'T_'; TABLE_NAME ------------------------------ TB T5 T4 T2 T1
declare s varchar2(100); begin for x in (select table_name from user_tables where table_name like 'T_') loop s := 'drop table :1'; dbms_output.put_line(s); execute immediate s using x.table_name; end loop; end;
drop table :1 declare * ERROR at line 1: ORA-00903: invalid table name ORA-06512: at line 7