34,873
社区成员
发帖
与我相关
我的任务
分享select * from tempdb.sys.tablescreate table #testTable1
(
c1 int
)
go
if exists(select name from tempdb.dbo.sysobjects where name like '#testTable1%' and type='U')
Begin
--如果表已经存在,执行相应操作
SELECT '存在 '
END
ELSE
Begin
--如果表不存在,执行相应操作
SELECT '不存在'
end