LENGTH
All functions > STRING > LENGTH
Returns the number of characters in a string.
Signatures
Returns: Number of characters in the string
LENGTH(string: VARCHAR) → BIGINT sql
| Parameter | Type | Required | Description |
|---|---|---|---|
string | VARCHAR | Yes | Input string to measure |
Notes
- Counts characters, not bytes
- Spaces and special characters are counted
- Unicode characters (emoji, symbols) count as single characters
- Aliases: LEN, SIZE
Aliases
LENSIZE
Examples
FeatureQL
SELECT
f1 := LENGTH('Hello World'), -- Basic string length
f2 := LENGTH('ABC'), -- Short string
f3 := LENGTH(' spaces '), -- Spaces are counted
f4 := LENGTH('😀😁'), -- Emoji characters
f5 := LENGTH('€100'), -- Euro symbol counts as 1
f6 := LEN('test') -- Using alias LEN
;Result
| f1 BIGINT | f2 BIGINT | f3 BIGINT | f4 BIGINT | f5 BIGINT | f6 BIGINT |
|---|---|---|---|---|---|
| 11 | 3 | 10 | 2 | 4 | 4 |
On this page