通过object_id函数获得
如:
if object_id(‘tempdb.dbo.#temp’) is not null
drop table #temp
当存在临时表#temp时,删除临时表#temp,注意临时表所在的数据库为tempdb,
通过object_id函数获得
如:
if object_id(‘tempdb.dbo.#temp’) is not null
drop table #temp
当存在临时表#temp时,删除临时表#temp,注意临时表所在的数据库为tempdb,