Aug 04, 2020 11:05 am
SQL Case Statement use
1 Reply
Aug 05, 2020 4:26 am
It allows you to embed an if-else like a clause in the SELECT clause.
Here is an example.
SELECT Employee_Name,CASE Location
WHEN ‘Joe’ THEN Bonus * 2
WHEN ‘Peter’ THEN Bonus *, 5
ELSE Bonus
END
“New Bonus”
FROM Employee;