select *
from sysobjects a
where a.xtype='u' and a.name like '%_BK'然后想怎么做怎么做~~

解决方案 »

  1.   

    错了,刚才是sqlserver的~~oracle应该是
    select * from dba_tables
    where table_name like '%_BK' and owner=你的用户名
      

  2.   

    利用sqlplus和文本编辑器(记事本不行,得功能强大些的)实现
    1\在sqlplus中
    select * from dba_tables where table_name like '%_BK' and owner=你的用户名
    2\将结果copy到文本文件
    3\利用文本编辑器将此文件的'新行'替换为'drop table ',在每行的结尾加';'
    4\在sqlplus下执行此文本文件.
      

  3.   

    先找到符合条件的表名
    循环删除
    declare v_sql varchar2(200);
    begin
    for rec in (select * from all_objects where objeci_name like '%_BK'
    and object_type='TABLE' and 用户字段= 你的用户名
     )
    loop
     v_sql:='drop table 你的用户名.:p1 ';
     execute immediate v_sql using rec.object_name;
    end loop;
    end;--
    你测试一下
    我家里没装oracle,具体字段记不清楚了
    all_objects 表里面会有表名,用户等,你对应一下
      

  4.   

    icedut(冰)  你好强```
    结贴了```