ROUND Roller Coaster!
ROUND
Syntax: ROUND (number [, decimal precision])
Parameters: number is a source number or column containing source number.
Decimal precision specifies the degree of rounding and is the optional
parameter. If decimal precision parameter is absent, the default degree of
rounding is zero, which means source number is rounded to nearest whole number.
Return type: ROUND function (as it applies to number) return a numeric value.
Usage:
For the reporting purpose,
Manager wants salaries of employees in thousands of dollars.
Manager to Data analyst: Bring me the list of all employees and their salaries in
thousands. Data analyst runs below query to fetch the required data.
SELECT EMPLOYEE_ID, FIRST_NAME,
LAST_NAME, ROUND(SALARY, -3) FROM
EMPLOYEES;
Comments
Post a Comment