请教一条判断表中是否有返回值记录的SQL语句! if exsist(select X From Table where expression) pringt ""else print "" 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 if exists (select top 1 * from Table where ...) print 'dfadf'else print 'gdsgds' if (select count(0) from table where ...) > 0 print 'y'else print 'n'-- orif exists(select 1 from table where .....) print 'y'else print 'n' declare @icount intselect @icount=count(*)from tableif @icount>0beginprint 'y'endelsebegin print 'n'end if (select b.rowsfrom sysobjects a,sysindexes b where a.id=b.id and a.name='表名') is not null print 'y'else print 'n' if exists(select 1 from table where .....) print 'y'else print 'n' 大数据量查询,救急!! 关于sql的问题 sql中表名用变量怎么写? 安装时出现的问题,在线等. 请教一个有关ASP.NET连接SQL SERVER的问题,谢谢! [提问]为什么要建立多个表,一个表不行吗? sql2005的一个mdf文件始终附加不上来,请哪位大侠帮帮忙 高难度SQL查询,请大家进来帮下我吧 中文排序 sql server 数据库中,表的索引和约束有什么不同 啊????我很糊涂 如何将access中的数据导入sqlserver? 菜鸟问题:别人给我一个.mdf的文件。我怎么加入到SQL SERVER里
print 'dfadf'
else
print 'gdsgds'
print 'y'
else
print 'n'-- or
if exists(select 1 from table where .....)
print 'y'
else
print 'n'
select @icount=count(*)from table
if @icount>0
begin
print 'y'
end
else
begin
print 'n'
end
from sysobjects a,sysindexes b where a.id=b.id and a.name='表名') is not null print 'y'
else
print 'n'
print 'y'
else
print 'n'