删除临时表

方法:

 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

 

posted @ 2015-05-23 20:49  willey01  阅读(125)  评论(0编辑  收藏  举报