ROUND and TRUNC Assignment Help

Assignment Help: >> Scalar Functions - ROUND and TRUNC

ROUND

Syntax

ROUND(d[,fmt])
It will return d rounded to the unit specified through the format model fmt. d is rounded to the nearest day if fmt is omitted.

Example
SELECT ROUND(SYSDATE,'YEAR') "FIRST OF THE YEAR" FROM DUAL
FIRST OF
---------
01-JAN-01


TRUNC

Syntax
TRUNC(d,[fmt])
It will return d with the time portion of the day truncated to the unit specified through the format model fmt. d is truncated to the nearest day if we omit fmt.

Example
SELECT TRUNC(SYSDATE, 'MM') "First Of The Month"  FROM DUAL
First Of
---------
01-DEC-00

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd