方法:
1 --#local_variable代表临时表名 2 if object_id('tempdb.[dbo].#local_variable') is not null 3 begin 4 drop table #local_variable 5 end 6 或 7 if object_id('tempdb..#local_variable') is not null 8 begin 9 drop table #local_variable 10 end