select count(*) into a from user_tables where table_name='xxx';
if a>0 then
drop tablename

解决方案 »

  1.   

    rick你说的很正确啊,不过想问一下有没有一个判断的函数存在吗?如:EXISTS什么之类的吗?另外你说的SQL,好像不能运行!
      

  2.   

    select count(*) into a from user_tables where table_name='xxx';
    if a>0 then
    drop tablename
    =============================
    即使表中没有任何记录,它也可能是存在的.
    查看视图(如果你有足够的权限):
    select * from dba_tables where tablename='***'