SELECT 'the absolute of -29 is '|| ABS(-29) FROM dual;
round
SELECT 222.34501, ROUND(222.34501,2), TRUNC(222.34501,2)
FROM DUAL
nvl
replaces a NULL with a default value
NVL(input_expression, substitution_expression
SELECT 60+60+NVL(NULL,1000) FROM dual
SELECT course_no, description,
NVL(prerequisite, 'Not Applicable') prereq
FROM course
WHERE course_no IN (20,100)
output: error, must --- >
NVL(TO_CHAR(prerequisite), 'Not Applicable') prereq
decode
The decode function substitutes values based on a condition using if-then-else logic.
DECODE(if_expr, equals_search, then_result [, else_default])
DECODE(state, 'NY', 'New York',
'NJ', 'New Jersey') no_default,
DECODE((state, 'NY', 'New York',
'NJ', 'New Jersey'
'OTHER') with_default,
FROM zipcode
WHERE state IN ('NY', 'NJ', 'CT');