草庐IT

php - MySQL 中的算术运算

我想在mysql中执行如下所示的SQL查询:SELECT(0-5)AS`sqlTest`,if(`sqlTest`但我收到错误消息“'字段列表'中的未知列'sqlTest'”注意事项Thisisnotanexactquery.Heretheoperands0and5willbereplacedwith2bigSelectqueries. 最佳答案 嘿,我得到了你问题的答案。这里,试试这个,SELECT@var:=(0-5)ASsqlTest,if(@var 关于php-MySQL中的算术