How do I perform an IF...THEN in an SQL SELECT?
Asked 07 September, 2021
Viewed 1.9K times
  • 57
Votes

How do I perform an IF...THEN in an SQL SELECT statement?

For example:

SELECT IF(Obsolete = 'N' OR InStock = 'Y' ? 1 : 0) AS Saleable, * FROM Product

30 Answer