sql语句减法出错
(select a.value from a where a.id=363)-(select a.value from a where a.id=362)
报错:-附近有语法错误。
请问怎么解决
------解决方案--------------------select (select a.value from a where a.id=363)-(select a.value from a where a.id=362)
------解决方案--------------------select (select a.value from a where a.id=363)-(select a.value from a where a.id=362)
------解决方案--------------------SELECT a.value
FROM a
WHERE a.id = 363
UNION
SELECT -1 * a.value
FROM a
WHERE a.id = 362
------解决方案--------------------select ((select a.value from a where a.id=363)-(select a.value from a where a.id=362)) value from a