'IF' in 'SELECT' statement - choose output value based on column values
Asked 07 September, 2021
Viewed 2.8K times
  • 53
Votes
SELECT id, amount FROM report

I need amount to be amount if report.type='P' and -amount if report.type='N'. How do I add this to the above query?

7 Answer