如何用一个SQL语句来判断一个表是否存在

2025-03-24 00:34:21
推荐回答(1个)
回答1:

请采用下列sql脚本

if exists(select null from sysobjects where xtype='u' and name ='表名') 
begin
print '表存在数据库中!'
end

请采纳以上sql,如有疑问,请及时沟通!