【问题标题】:sql query return the sum of two recordssql查询返回两条记录的总和
【发布时间】:2015-03-04 11:33:51
【问题描述】:

在mysql中,可以查询两个表记录的总和吗? :

    Table1

     Col1  Col2

Row1 1     2

Ro2  3     4

Col2:Row1+Row2=6

类似于 SELECT Col2 FROM TABLE1 SUM(Row1+Row2) ?

【问题讨论】:

    标签: mysql math


    【解决方案1】:

    如果我理解正确的话:

    select sum(Col2) from Table1
    

    【讨论】:

      猜你喜欢
      • 2016-04-24
      • 1970-01-01
      • 2023-03-12
      • 2013-10-31
      • 2016-08-27
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多