create table #testTable1 

c1 int 
) go 
if exists(select name from tempdb.dbo.sysobjects where name like '#testTable1%' and type='U')
Begin 
          --如果表已经存在,执行相应操作 
    SELECT '存在 '
END 
ELSE 
Begin 
          --如果表不存在,执行相应操作 
SELECT '不存在'
end  create table c(id int)if   exists(select   *   from   dbo.sysobjects   where   
id   =   object_id(N'c')   and   OBJECTPROPERTY(id,N'IsUserTable')=1) 
Begin 
          --如果表已经存在,执行相应操作 
    SELECT '存在 '
END 
ELSE 
Begin 
          --如果表不存在,执行相应操作 
SELECT '不存在'
end