在 MySQL 中是否有一种优雅的方法可以做到这一点:
SELECT (subquery1) AS s1, (subquery2) AS s2, (s1+s2) AS s3
或者我必须求助于
SELECT (subquery1) AS s1, (subquery2) AS s2, ((subquery1)+(subquery2)) AS s3
?
谢谢
编辑:两个子查询都产生整数结果
在 MySQL 中是否有一种优雅的方法可以做到这一点:
SELECT (subquery1) AS s1, (subquery2) AS s2, (s1+s2) AS s3
或者我必须求助于
SELECT (subquery1) AS s1, (subquery2) AS s2, ((subquery1)+(subquery2)) AS s3
?
谢谢
编辑:两个子查询都产生整数结果