Home
Oracle
OracleTRUNC:
TRUNC function truncates that is in other words cuts off to the digits specified.
The general syntax of TRUNC function is:
TRUNC(number, precision);
For instance:
Suppose the value of salary in employee table for ename= ’Exforsys’ is 55.666 Then
Select TRUNC(salary,2) from employee where ename=’Exforsys’;
Gives output as
TRUNC(salary) ------------------ 66.66
ROUND:
ROUND function rounds the number to a specified number of decimal places. The general syntax of TRUNC function is:
ROUND(number, precision);
For instance:
Suppose the value of salary in employee table for ename= ’Exforsys’ is 55.666 Then
Select ROUND(salary,2) from employee where ename=’Exforsys’;
Gives output as
ROUND(salary) ------------------ 66.67
Next: Explain about TNSPING
Comments
Post Comment
Daily Email Updates
Oracle Tutorials
Related Tutorials
Sponsored Links

TRUNC function cuts off to the digits specified.