检测临时表:

if exists (select 1 from tempdb..sysobjects where id=object_id('tempdb..#temp_事实表') and xtype='U') 
  Drop Table #temp_事实表

 

检测基础表:

if exists (select 1
            from  sysobjects
           where  id = object_id('t_事实表')
            and   xtype = 'U')

相关文章:

  • 2021-11-02
  • 2022-12-23
  • 2021-10-30
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-12-25
  • 2021-09-17
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-12-07
  • 2021-08-07
  • 2021-08-08
相关资源
相似解决方案