当前位置: 代码迷 >> ASP.NET >> |M| Sql查询计算数据 求方法解决方法
  详细解决方案

|M| Sql查询计算数据 求方法解决方法

热度:5939   发布时间:2013-02-26 00:00:00.0
|M| Sql查询计算数据 求方法
table  
id     apple   applecount   orange   orangecount
1             15                     2           10                       5

查出表格式如下

id     apple   applecount   orange   orangecount     tatil
1             15                     2           10                       5           80

谢谢

------解决方案--------------------------------------------------------
select id,apple, applecount, orange, orangecount,(apple * applecount + orange * orangecount) as tatil from table
  相关解决方案