SELECT id,
DECODE(customer_id, 'AOL', 'America Online') Company,
order_date
FROM test2
WHERE ROWNUM < 21
/
SELECT program_id,
DECODE(customer_id,
'AOL', 'America Online',
'TW', 'Time Warner',
'ORCL', 'Oracle Corporation',
'NetApp', Network Appliances',
order_date
FROM test2
WHERE ROWNUM < 21
/
decode with default
SELECT program_id,
DECODE(customer_id,
'AOL', 'America Online',
'TW', 'TIME Warner',
'ORCL', 'Oracle Corporation',
'NetApp', Network Appliances',
'OTHER'
order_date
FROM test2
WHERE ROWNUM < 21
/