Saturday, August 27, 2016

Oracle SQL Number Functions



Number Functions

• ROUND:         Rounds value to a specified decimal
• TRUNC:         Truncates value to a specified decimal
• CEIL:              Returns the smallest whole number greater than or equal to a specified number
• FLOOR:          Returns the largest whole number equal to or less than a specified number
• MOD:             Returns remainder of division


Function Purpose

ROUND(column|expression, n) -Rounds the column, expression, or value to n decimal
places or, if n is omitted, no decimal places (If n isnegative, numbers to the left of decimal point are rounded.

TRUNC(column|expression, n) -Truncates the column, expression, or value to n decimal places or, if n is omitted, n defaults to zero


MOD(m,n) -Returns the remainder of m divided by n


CEIL FLOOR MOD
CEIL FLOOR MOD

ROUND
ROUND

TRUNC
TRUNC

Featured Post

Will the data from Oracle Database be lost after formatting the system in which it is installed?

So Someone asked me a question,  Will the data from Oracle Database be lost after formatting the system in which it is installed? Since the ...

Popular Posts