This Oracle tutorial explains how to use the Oracle/PLSQL TRUNC function (as it applies to numeric values) with syntax and examples.
The Oracle/PLSQL TRUNC function returns a number truncated to a certain number of decimal places.
The syntax for the TRUNC function in Oracle/PLSQL is:
The number to truncate.
Optional. The number of decimal places to truncate to. This value must be an integer. If this parameter is omitted, the TRUNC function will truncate the number to 0 decimal places.
The TRUNC function (as it applies to numbers) returns a numeric value.
The TRUNC function can be used in the following versions of Oracle/PLSQL:
Let's look at some Oracle TRUNC function examples and explore how to use the TRUNC function in Oracle/PLSQL.
For example: