> ## Documentation Index
> Fetch the complete documentation index at: https://docs.firebolt.io/llms.txt
> Use this file to discover all available pages before exploring further.

> Reference material for TRUNC function

# TRUNC

Returns the rounded absolute value of a numeric value. The returned value will always be rounded to less than the original value.

## Syntax

```sql theme={"theme":{"light":"css-variables","dark":"css-variables"}}
TRUNC(<value>[, <decimal>])
```

## Parameters

| Parameter   | Description                                                                                                                      | Supported input types |
| :---------- | :------------------------------------------------------------------------------------------------------------------------------- | :-------------------- |
| `<value>`   | Valid values include column names, functions that return a column with numeric values, and constant numeric values.              | `DOUBLE PRECISION`    |
| `<decimal>` | Optional. An `INTEGER` constant that defines the decimal range of the returned value. By default, `TRUNC` returns whole numbers. | `INTEGER`             |

## Return Type

`DOUBLE PRECISION`

## Examples

**Example**

The following example returns the truncated value of `-20.5`:

<div className="query-window">
  ```
  SELECT TRUNC(-20.5);
  ```

  | trunc <span>double</span> |
  | :------------------------ |
  | -20                       |

  <p><span>Rows: 1</span><span>Execution time: 5.83ms</span></p>
</div>

**Example**

The following example returns the truncated value of `-99.999999` to `3` decimal places:

<div className="query-window">
  ```
  SELECT TRUNC(-99.999999, 3);
  ```

  | trunc <span>double</span> |
  | :------------------------ |
  | -99.999                   |

  <p><span>Rows: 1</span><span>Execution time: 5.83ms</span></p>
</div>
