阅读背景:

然后mysql中的sum列使用where子句中的结果

来源:互联网 

I want to be able to do this:

我希望能够做到这一点:

SELECT dept.id, (invoices.col1 + invoices.col2 + invoices.col3) as sumTotal 
FROM dept 
     INNER JOIN invoices ON invoices.id_dept = dept.id 
WHERE sumTotal > 10000
S



你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: