IF object_id('tempdb..#temp') is not null
print '存在!'
else
print '不存在!'
本文提供了一个简单的T-SQL脚本示例,用于检查SQL Server中名为#temp的临时表是否存在。通过此脚本,可以轻松地了解指定的临时表是否已被创建。
IF object_id('tempdb..#temp') is not null
print '存在!'
else
print '不存在!'
被折叠的 条评论
为什么被折叠?