Difference between CASE and DECODE
EV259Jun 2 2013 — edited Jun 3 2013Hi All,
Could you please explain me the basic differences between the CASE and DECODE, which performs fast...?
DECODE is Oracle one, and the CASE is ANSI standard.
As per my knowledge, CASE is a statement and DECODE is a function which was defined in the Standard package.
If we use DECODE, the package has to load first, so it will take a little longer than the CASE. CASE is a simple statement which is ANSI standard.
We can use the CASE in the where clause and can not use the DECODE in the where clause.
Please clarify me and correct me if anything wrong.
Thanks,