NUMERIC BUILT IN FUNCTIONS

From rbachwiki
Revision as of 18:51, 19 November 2017 by Bacchas (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

ROUND()

THE , 2 AT THE END IS NUMBER OF PLACES TO ROUND

ROUND(49.113212,2)  = 49.11

CEIL()

Integer value that is greater than or equal to the number

CEIL(48.99)=49

POWER()

POWER(4,2)=16

SQRT()

SQRT(16)=4

GREATEST()

Returns the largest of multiple value

GREATEST(9,67.6,10)67.6

converting numbers to character

SELECT TO_CHAR(SALARY, '$99,999') AS "SALARY"
FROM EMPLOYEES 
RESULT -> $24,000
TO_CHAR(3000, '$999999.99') -> $3000.00
TO_CHAR(4500, '$99,999') -> $4,500
TO_CHAR(9000, '$99,999.99') -> $9,000.00
TO_CHAR(4422, '$0009999') -> $0004422

Back To Top- Home - Category