判断临时表是否存在,存在则删除
if object_id('tempdb..#regionChildPurchase') is not null
Begin DROP TABLE #regionChildPurchase End
if exists(select * from tempdb..sysobjects where id=object_id('tempdb..##TEMP_TBL'))
PRINT '存在'
ELSE
PRINT'不存在'
if object_id('tempdb..#regionChildPurchase') is not null
Begin DROP TABLE #regionChildPurchase End
if exists(select * from tempdb..sysobjects where id=object_id('tempdb..##TEMP_TBL'))
PRINT '存在'
ELSE
PRINT'不存在'