Returns the number of characters in a string. An alias for LENGTH, available for standard SQL compatibility.
INT64Diperbarui: 13 Jun 2026CHAR_LENGTH(value)The string whose length will be measured
1 SELECT CHAR_LENGTH('Hello World') as len;
Counts characters including spaces.
1 SELECT 2 CHAR_LENGTH('Hello') as ascii_len, 3 CHAR_LENGTH('こんにちは') as japanese_len, 4 CHAR_LENGTH('🎉🎊🎈') as emoji_len;
CHAR_LENGTH correctly counts Unicode characters.
| ascii_len | japanese_len | emoji_len |
|---|---|---|
| 5 | 5 | 3 |
Sudah paham CHAR_LENGTH? Latih langsung di browser
Latihan interaktif, langsung di browser.