Skip to content

Latest commit

 

History

History
27 lines (20 loc) · 583 Bytes

char_length.md

File metadata and controls

27 lines (20 loc) · 583 Bytes
description
Returns the character length of the input string.

CHAR_LENGTH

Syntax

CHAR_LENGTH(expression STRING) → INTEGER

  • expression: The expression (VARCHAR) to determine character length for.

Examples

{% code title="CHAR_LENGTH example" %}

SELECT CHAR_LENGTH('get the char length')
-- 19

{% endcode %}

{% code title="CHAR_LENGTH example" %}

SELECT CHAR_LENGTH('SPICE')
-- 5

{% endcode %}