O'Reilly logo
  • Lokesh Singh thinks this is interesting:

The Numeric TRUNC Function (Truncate)

The TRUNC function performs a truncation operation on a numeric value based on the decimal precision specified. A numeric truncation is different from rounding in that it drops the numbers beyond the decimal precision specified and does not attempt to round up or down if the decimal precision is positive. However, if the decimal precision (n) is negative, the input value is zeroed down from the nth decimal position.

The TRUNC function takes two parameters. Its syntax is TRUNC(source number, decimal precision). Source number represents any numeric value. Decimal precision specifies the degree...