Course
Simulator
More
Premium
Log in
PostgreSQL Function Reference
Functions
TRUNC
TRUNC
Truncates a number to the specified number of decimal places.
PostgreSQL 17.5
TRUNC
(
num
,
decimals
)
num
The number
decimals
Number of decimal places
Examples
PostgreSQL 17.5
SELECT
TRUNC
(
22.29
,
0
)