It seems like DECODE works almost like CASE WHEN. ...
# suiteanalytics
l
It seems like DECODE works almost like CASE WHEN. Any other specific use case for DECODE?
c
DECODE is good for when you need to use If-Then-Else logic. DECODE is very similar to CASE statements, but only performs equality checks. DECODE was created first in the Oracle database before CASE statements, so CASE statements can do everything DECODE can do, but DECODE can't do everything that CASE statements do.
l
Makes sense! Seems like I'll be using CASE statements then mostly. Thanks!
k
decode can use fewer characters depending on use case.