RELATEED CONSULTING
相关咨询
选择下列产品马上在线沟通
服务时间:8:30-17:00
你可能遇到了下面的问题
关闭右侧工具栏

新闻中心

这里有您想知道的互联网营销解决方案
判断临时表是否存在,存在就删除
--下面以临时表#temp为例,判断它是否存在,存在就删除它
IF OBJECT_ID('tempdb..#temp') is not null
drop table #temp



--方法一
1if exists (select * from tempdb.dbo.sysobjects where id = object_id(N'tempdb..#tempcitys') and type='U')2    drop table #tempcitys

--方法二
if object_id('tempdb..#tem') is not null 
begin 
print 'exists' 
end 
else 
begin 
print 'not exists' 
end

网页名称:判断临时表是否存在,存在就删除
URL地址:http://scyingshan.cn/article/psspsh.html