|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