Hi People,
Hope you are doing fine
I just want to know the difference between a IF THEN..ELSE and a PLSQL CASE statement.
CASE is present in both SQL and PLSQL as like below,
SQL :
select case when 1=1 then 'Hi' end from dual;
PLSQL:
BEGIN
CASE
WHEN 1=1 THEN
NULL; -- Some executable condition
END CASE;
END;
/
The above PLSQL CASE..END CASE is exactly equal to IF THEN..ELSE statement and I am not able to spot any difference between them.
Please post some differences between them that you are aware of!
Thanks.