如何将一条SQL语句:当返回集为null时返回0,应该如何写呢? select isnull(point,0) from news where id=1 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 if @@rowcount = 0return 0 上面写错了select isnull((select top 1 point from news where id=1),0) if not exists(Select Sub(point) Form News where id = 1)return 0 select isnull((select top 1 point from news where id=1),0) select isnull(a.SumPoint,0) from (Select Sub(point) as SumPoint Form News where id = 1) a Select isnull(point,0) as point Form News where id = 1 Select Coalesce(point,0) Form News where id = 1 Select Sub(point) Form News where id = 1if @@rowcount=0 return 0 Select Sub(isnull(point,0)) Form News where id = 1 SELECT ISNULL(POINT ,0) FROM NEWS WHERE [ID]=1 SELECT ISNULL(POINT ,0) FROM NEWS WHERE [ID]=1 很菜的问题,鼓起勇气发出来 如何批量修改数据 恢复数据库。请高手解决。人命关天 如何检索text类型的字段 存储过程查询现有表中是否存在相同字段,如果有,则将该相同的字段返回。。得到不到结果。。昏 zjcxc(: 邹建 :) 大哥在进来帮帮小弟,我按着你刚才给的SQL语句写这个,提示说数据库错啊 关于调查问卷的分析系统的数据库设计思路? 字符数据的截取问题 数据库容量为何到了4050MB后就不能再增加了? 我想死个明白! 汇总统计,请各位帮忙!有点急啊! 不能不看的---看完之后请让你的朋友也能看到!!跪谢!
return 0
return 0
if @@rowcount=0
return 0