if objects_id('表名') is not null select '存在' else select '不存在'
if exists (select * from sysobjects where name = 'yourtablename' and xtype = 'u') print '存在'
if objects_id('表名') is not null select '存在' else select '不存在'
if exists (select * from sysobjects where name = 'yourtablename' and xtype = 'u') print '存在'
if exists(select 1 from sysobjects where name='表名' and xtype='u') print '存在' else print '不存在'
if objectproperty(object_id('要判断的表'),'IsUserTable')=1 print '存在' else print '不存在'
if objects_id('表名') is not null select '存在' else select '不存在'if exists (select * from sysobjects where name = 'yourtablename' and xtype = 'u') print '存在' else print '不存在'if objectproperty(object_id('要判断的表'),'IsUserTable')=1 print '存在' else print '不存在'
select '存在'
else
select '不存在'
print '存在'
select '存在'
else
select '不存在'
print '存在'
print '存在'
else
print '不存在'
print '存在'
else
print '不存在'
select '存在'
else
select '不存在'if exists (select * from sysobjects where name = 'yourtablename' and xtype = 'u')
print '存在'
else
print '不存在'if objectproperty(object_id('要判断的表'),'IsUserTable')=1
print '存在'
else
print '不存在'