IF(expression1,expression2,expression3) if expression1 is true, returns expression2, otherwise, returns expression3
IF(expression1,expression2,expression3)
an example:
SELECT IF(a.phone_pref = 'home', a.home_phone, a.work_phone) AS phone FROM individual a;
More information about formatting options
Loading...
Cannot wait? Visit me on Twitter. And how about a follow, huh?.
Add your comment