[discrete]
[[esql-length]]
=== `LENGTH`

*Syntax*

[source,esql]
----
LENGTH(str)
----

*Parameters*

`str`::
String expression. If `null`, the function returns `null`.

*Description*

Returns the character length of a string.

*Example*

[source.merge.styled,esql]
----
include::{esql-specs}/eval.csv-spec[tag=length]
----
[%header.monospaced.styled,format=dsv,separator=|]
|===
include::{esql-specs}/eval.csv-spec[tag=length-result]
|===
