LENGTH

All functions > STRING > LENGTH

Returns the number of characters in a string.

Syntax

LENGTH(expr)
sql

Arguments

ParameterTypeRequiredDescription
stringVARCHARYesInput string to measure

Returns

Number of characters in the string

Notes

  • Counts characters, not bytes
  • Spaces and special characters are counted
  • Unicode characters (emoji, symbols) count as single characters
  • Aliases: LEN, SIZE

Aliases

  • LEN

  • SIZE

Examples

Last update at: 2025/10/13 10:23:46