top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

What is the use of CASE in Oracle?

0 votes
355 views
What is the use of CASE in Oracle?
posted Aug 12, 2015 by Archana

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

1 Answer

+1 vote
 
Best answer

CASE expression is used like IF..THEN...ELSE logic in SQL statement without invoking procedures.
Example:
SELECT ename,
sal,
CASE sal WHEN 1000 THEN 'Low'
WHEN 5000 THEN 'High'
ELSE 'Medium'
END
FROM emp;

answer Aug 13, 2015 by Arun Gowda
...