400 028 6601

建站动态

根据您的个性需求进行定制 先人一步 抢占小程序红利时代

判断临时表是否存在,存在就删除

--下面以临时表#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

当前题目:判断临时表是否存在,存在就删除
路径分享:http://www.bluegullmedia.com/article/psspsh.html

其他资讯

让你的专属顾问为你服务

0.0476s