求教~

解决方案 »

  1.   

    return case when object_id('表名') is null then  else 1 end
      

  2.   

    if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[t3]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
     print 1
    else
     print 0
      

  3.   

    抱歉,更正一下:
    return case when object_id('表名') is null then 0 else 1 end
      

  4.   

    if object_id('tbname')  is not null 
    print 1
    else  
    print 0
      

  5.   

    select * from sysobjects
               where id = object_id('TableName') And 
               objectproperty(id, N'IsUserTable') = 1
      

  6.   

    if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[表名]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
     select 1
    else
     select 0--这样呢?