检测临时表:
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')