Pages

Showing posts with label PL/SQL DECODE. Show all posts
Showing posts with label PL/SQL DECODE. Show all posts

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;