12345678910111213141516171819202122232425262728293031323334 |
- [discrete]
- [[esql-round]]
- === `ROUND`
- *Syntax*
- [.text-center]
- image::esql/functions/signature/round.svg[Embedded,opts=inline]
- *Parameters*
- `value`::
- Numeric expression. If `null`, the function returns `null`.
- `decimals`::
- Numeric expression. If `null`, the function returns `null`.
- *Description*
- Rounds a number to the closest number with the specified number of digits.
- Defaults to 0 digits if no number of digits is provided. If the specified number
- of digits is negative, rounds to the number of digits left of the decimal point.
- include::types/round.asciidoc[]
- *Example*
- [source.merge.styled,esql]
- ----
- include::{esql-specs}/docs.csv-spec[tag=round]
- ----
- [%header.monospaced.styled,format=dsv,separator=|]
- |===
- include::{esql-specs}/docs.csv-spec[tag=round-result]
- |===
|