SQL 判断 临时表是否存在

判断临时表是否存在
Create Table  #tmpKeyWordLink
(
id 
int
)

  
if exists(select * from tempdb.dbo.sysobjects where id = object_id(N'tempdb..#tempKeyWordLink'and type='U')
     
drop table #tempKeyWordLink
 

 

posted @ 2011-08-19 17:14  Rex.He  阅读(213)  评论(0编辑  收藏  举报