有三张不同表,对每一个表的指定一列求和,一次执行这三条语句该怎么写?要求三个结果能显示就行.rt每次都有执行三条下列语句:select sum(column1) from table_a;select sum(column2) from table_b;select sum(co
来源:学生作业帮助网 编辑:作业帮 时间:2024/08/28 05:29:12
![有三张不同表,对每一个表的指定一列求和,一次执行这三条语句该怎么写?要求三个结果能显示就行.rt每次都有执行三条下列语句:select sum(column1) from table_a;select sum(column2) from table_b;select sum(co](/uploads/image/z/14135945-41-5.jpg?t=%E6%9C%89%E4%B8%89%E5%BC%A0%E4%B8%8D%E5%90%8C%E8%A1%A8%2C%E5%AF%B9%E6%AF%8F%E4%B8%80%E4%B8%AA%E8%A1%A8%E7%9A%84%E6%8C%87%E5%AE%9A%E4%B8%80%E5%88%97%E6%B1%82%E5%92%8C%2C%E4%B8%80%E6%AC%A1%E6%89%A7%E8%A1%8C%E8%BF%99%E4%B8%89%E6%9D%A1%E8%AF%AD%E5%8F%A5%E8%AF%A5%E6%80%8E%E4%B9%88%E5%86%99%3F%E8%A6%81%E6%B1%82%E4%B8%89%E4%B8%AA%E7%BB%93%E6%9E%9C%E8%83%BD%E6%98%BE%E7%A4%BA%E5%B0%B1%E8%A1%8C.rt%E6%AF%8F%E6%AC%A1%E9%83%BD%E6%9C%89%E6%89%A7%E8%A1%8C%E4%B8%89%E6%9D%A1%E4%B8%8B%E5%88%97%E8%AF%AD%E5%8F%A5%EF%BC%9Aselect+sum%28column1%29+from+table_a%3Bselect+sum%28column2%29+from+table_b%3Bselect+sum%28co)
有三张不同表,对每一个表的指定一列求和,一次执行这三条语句该怎么写?要求三个结果能显示就行.rt每次都有执行三条下列语句:select sum(column1) from table_a;select sum(column2) from table_b;select sum(co
有三张不同表,对每一个表的指定一列求和,一次执行这三条语句该怎么写?要求三个结果能显示就行.
rt
每次都有执行三条下列语句:
select sum(column1) from table_a;
select sum(column2) from table_b;
select sum(column3) from table_c;
能不能执行一条语句,使得结果显示为:
sum(column1) ,sum(column2) ,sum(column3)
有三张不同表,对每一个表的指定一列求和,一次执行这三条语句该怎么写?要求三个结果能显示就行.rt每次都有执行三条下列语句:select sum(column1) from table_a;select sum(column2) from table_b;select sum(co
--显示在同一行
select
(select sum(column1) from table_a),
(select sum(column2) from table_b),
(select sum(column3) from table_c)
--显示在同一列
select sum(column1) from table_a
union all
select sum(column2) from table_b
union all
select sum(column3) from table_c