Difference between revisions of "NUMERIC BUILT IN FUNCTIONS"
Jump to navigation
Jump to search
(Created page with "==ROUND()== ROUND(49.113212) = 49.11 ==CEIL()== '''Integer value that is greater than or equal to the number''' CEIL(48.99)=49 ==POWER()== POWER(4,2)=16 ==SQRT()== SQR...") |
|||
(One intermediate revision by the same user not shown) | |||
Line 1: | Line 1: | ||
==ROUND()== | ==ROUND()== | ||
ROUND(49.113212) = 49.11 | ''' THE , 2 AT THE END IS NUMBER OF PLACES TO ROUND''' | ||
ROUND(49.113212,2) = 49.11 | |||
==CEIL()== | ==CEIL()== | ||
Line 15: | Line 16: | ||
''' Returns the largest of multiple value''' | ''' Returns the largest of multiple value''' | ||
GREATEST(9,67.6,10)67.6 | GREATEST(9,67.6,10)67.6 | ||
<h2> converting numbers to character </h2> | |||
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 | |||
[[#Select Command|Back To Top]]-[[Main_Page| Home]] - [[Oracle_SQL|Category]] |
Latest revision as of 18:51, 19 November 2017
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