如果让sum为空的行不返回·· select sum(a),sum(b) from table where id=1出来的结果是有一条数据 但是都是null 我不想要这行 也不想显示为0什么的。就是为空不返回··怎么弄好啊 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 select * from (select a = sum(a),b = sum(b) from table where id=1) where a is not null and b is not null这样? 不行···关键字 'where' 附近有语法错误。 select sum(a),sum(b) from table where id=1 having sum(a) is not null or sum(b) is not null havingselect sum(a),sum(b) from table where id=1 having sum(a) is not null and sum(b) is not null select * from (select a=sum(a),b=sum(b) from excelTest where id=1) t where t.a is not null and t.b is not null select * from (select a = sum(a),b = sum(b) from table where id=1)T where a is not null and b is not null 不好意思 4楼···没看到你那个···sorry··· 请问把一个表中的数据全部导出到另一个表的两种写法 数据表的替换 求一条 SQL 语句,谢谢 出错。。。。。。。。。。。。。。。。。。。 SQL:怎样将多个表的查询结果放到一张表里? 我在表中有一单号字段,怎样显示出中间没有用的单号?请进来看详细内容。谢谢! 哪位大师能给小弟介绍一些有关ASP结合SQL建网站的资料? 存储过程式如何调试呀? 高手请教 请教如何建立这样的约束? 自定义函数报错 如果实现:运行某SQL,但是其中某些内容1小时后才执行?
select * from
(select a=sum(a),b=sum(b) from excelTest where id=1) t
where t.a is not null and t.b is not null
select * from (select a = sum(a),b = sum(b) from table where id=1)T
where a is not null and b is not null