Question : oracle decode
Answered by : vastemonde
DECODE(X, D1, R1, D2, R2, D3, R3, ..., Rx)
/*
if X = D1 then return R1
else if X = D2 then return R2
else if X = D3 then return R3
...
else return Rx
*/
Source : | Last Update : Tue, 09 Feb 21
Question : decode function in oracle
Answered by : jayesh-patil
SELECT supplier_name,
DECODE(supplier_id, 10000, 'IBM', 10001, 'Microsoft', 10002, 'Hewlett Packard', 'Gateway') result
FROM suppliers;
Source : https://www.techonthenet.com/oracle/functions/decode.php | Last Update : Mon, 11 Sep 23