# TRUNCATE

Returns the number **x** truncated to **d** decimal places. This is similar to the [TRUNC](https://docs.singlestore.com/db/v9.1/reference/sql-reference/numeric-functions/trunc.md) function, except that the precision (d) is required.

## Syntax

```sql
TRUNCATE (x, d)

```

## Arguments

* x: the number to be truncated
* d: the number of decimal places

## Return Type

Float or double.

## Examples

```sql
SELECT TRUNCATE(PI(), 5);

```

```output

+-------------------+
| TRUNCATE(PI(), 5) |
+-------------------+
|           3.14159 |
+-------------------+

```

***

Modified at: February 24, 2023

Source: [/db/v9.1/reference/sql-reference/numeric-functions/truncate/](https://docs.singlestore.com/db/v9.1/reference/sql-reference/numeric-functions/truncate/)

(An index of the documentation is available at /llms.txt)
