Answers for "ORACL SQL DECODE"

SQL
1

ORACL SQL DECODE

SELECT 
DECODE (t.column_name,  1, 'Southlake', 
                        2, 'San Francisco', 
                        3, 'New Jersey', 
                        4, 'Seattle',
                           'Non domestic') new_name
FROM table_name t
 # If warehouse_id is not 1, 2, 3, or 4, then the function returns 'Non domestic'.
Posted by: Guest on September-11-2021

Code answers related to "SQL"

Browse Popular Code Answers by Language