TRUNC Demo
SQL> SELECT TRUNC(1234.5678, 4) FROM DUAL;
TRUNC(1234.5678,4)
------------------
1234.5678
SQL> SELECT TRUNC(1234.5678, 3) FROM DUAL;
TRUNC(1234.5678,3)
------------------
1234.567
SQL> SELECT TRUNC(1234.5678, 2) FROM DUAL;
TRUNC(1234.5678,2)
------------------
1234.56
SQL> SELECT TRUNC(1234.5678, 1) FROM DUAL;
TRUNC(1234.5678,1)
------------------
1234.5
SQL> SELECT TRUNC(1234.5678, 0) FROM DUAL;
TRUNC(1234.5678,0)
------------------
1234
SQL> SELECT TRUNC(1234.5678, -1) FROM DUAL;
TRUNC(1234.5678,-1)
-------------------
1230
SQL> SELECT TRUNC(1234.5678, -2) FROM DUAL;
TRUNC(1234.5678,-2)
-------------------
1200
SQL> SELECT TRUNC(1234.5678, -3) FROM DUAL;
TRUNC(1234.5678,-3)
-------------------
1000
Related examples in the same category