select decode(count(*),0,'not exist','existed') from user_tables where table_name like 'TABLE_NAME'

解决方案 »

  1.   

    if exists(select * from sysobjects where name like table_name and type='U')
    .................
      

  2.   

    sqlserver:
    IF EXISTS (SELECT * FROM SYSOBJECTS WHERE ID = OBJECT_ID('table_name') AND TYPE='U')
        DROP TABLE table_name
      

  3.   

    SQLServer:if object_id('yourTableName') is not null and OBJECTPROPERTY(object_id('yourTableName'),'IsUserTable') = 1
    drop table yourTableName;
      

  4.   

    select count(*) from all_objects  where object_type='TABLE' and object_name='表名';如果count(*) =0表示没有你要找的表