YouOracle
Simple Oracle
Pages
Home
About
How to use PL/SQL Decode?
DECODE(expression, searchedValue, returnValues ...) function is used to search a value in a column or expression as it is done in IF-ELSE statements.
SELECT id, DECODE(id, 1, 'First row', 2, 'Second row') FROM students;
How to use NULLIF?
NULLIF(a, b) function compares a and b, if they are equal then it returns NULL, else returns a.
SELECT NULLIF('Zeynal', name) FROM students;
Newer Posts
Older Posts
Home
Subscribe to:
Posts (Atom)