11智能在线
新记
SQL语句如何在最后增加一行合计
如题所述
举报该文章
相关建议 2016-11-16
ç¨UNIONå°±è¡äºã
select a,b,c,d from table1 union all select sum(a) as a,sum(b) as b,sum(c) as c,sum(d) as d from table1
温馨提示:内容为网友见解,仅供参考
当前网址:
https://11.t2y.org/zz/pq2vpqfpvppp8qp84s4.html
其他看法
第1个回答 2016-11-16
GROUP BY xx WITH ROLLUP
ORDER BY xx DESC --确保“合计”行在最后一行。
相似回答
大家正在搜
相关问题
sql语句如何在查询记录后面增加一行合计
sql语句 最后一行增加合计
sql语句实现增加一行求和
SQL查询一批数据,怎么在最后一行增加个合计
求教,有没有办法在SQL查询的最后一行加上一个求和?
求一个sql 语句添加行 合计 内容如下
用SQL查询一批数据,怎么在最后一行增加个数字合计
SQL明细及汇总,请帮我在最后一行增加行合计