SELECT CASE WHEN EXISTS (select 1 from sysobjects where name='tbf') THEN 'TRUE' ELSE 'FALUE' END SELECT CASE WHEN OBJECT_ID( 'tb')>0 THEN 'TRUE' ELSE 'FALUE' END
RT就是RUTI 如题.IF EXISTS (select 1 from sysobjects where name='tbf') PRINT 'true' else PRINT 'Flase'
if EXISTS (select 1 from sysobjects where name='tbf') print 'true' else print 'false'
PRINT 'true'
else
PRINT 'Flase'
print 'true'
else
print 'false'
当查询结果存在时,返回真,否则返回假