TRUNCATE function
Syntax
TRUNCATE( number, length )
Description
The scalar function truncates number to length decimal places.
If value of length is positive, number is truncated to the length of places to the right of the decimal point.
If length is negative, number is truncates to positive value of length places to the left of decimal point
Arguments
Example
SELECT price, TRUNCATE(price, 1), TRUNCATE(price, -1)
FROM custorder;
PRICE TRUNCATE( TRUNCATE(
----- --------- ---------
1546.56 1546.50 1540.00