ReferenceSQL FunctionsString functionslengthVersion: Latest-4.1On this pageCopy as MarkdownView as Markdown/docs/sql-reference/sql-functions/string-functions/length.mdOpen in ClaudeOpen in ChatGPTBrowse all docs as Markdown/llms.txtlength This function returns the length of a string (in bytes). Syntaxβ INT length(VARCHAR str) Examplesβ MySQL > select length("abc");+---------------+| length('abc') |+---------------+| 3 |+---------------+ keyword