Open morphiaz opened 8 years ago
To be more precise, syntax is a bit different:
https://www.techonthenet.com/oracle/functions/case.php
https://www.techonthenet.com/sql_server/functions/case.php
https://www.techonthenet.com/mysql/functions/case.php
For example:
SELECT plantname,
CASE price
WHEN 1 THEN 'Cheap'
WHEN 2 THEN 'Expensive'
ELSE 'Unknown'
END
FROM plant
having something like this:
CASE WHEN ... WHEN ... WHEN ... THEN ...
is not creating a line break after each WHEN command. right now its beiing displayed like this:
CASE WHEN ... WHEN ... WHEN ... THEN ...
With a lot of CASEs, this is getting difficult.