sqlserver中判断表是否存在
用户表:
if   exists   (select   *   from   sysobjects   where   xtype   =   'u'   and   id   =   object_id(N'tablename')     
  ....   
临时表:
 if exists(select * from tempdb..sysobjects where id=object_id('tempdb..##Emp2'))
      drop table ##Emp2
 
                    
                     
                    
                 
                    
                
 
 
                
            
         
         浙公网安备 33010602011771号
浙公网安备 33010602011771号