Complete the code to get the byte length of the string 'hello'.
SELECT [1]('hello') AS length_bytes;
The LENGTH function returns the number of bytes in the string.
Complete the code to get the number of characters in the string 'café'.
SELECT [1]('café') AS char_count;
The CHAR_LENGTH function returns the number of characters, which is 4 for 'café'.
Fix the error in the code to correctly get the character count of 'naïve'.
SELECT [1]('naïve') AS char_count;
CHAR_LENGTH correctly returns the number of characters, including multibyte characters like 'ï'.
Fill both blanks to get the byte length and character length of 'résumé'.
SELECT [1]('résumé') AS bytes, [2]('résumé') AS chars;
LENGTH returns bytes, CHAR_LENGTH returns characters.
Fill all three blanks to get the byte length, character length, and compare if they are equal for 'touché'.
SELECT [1]('touché') AS bytes, [2]('touché') AS chars, ([1]('touché') [3] [2]('touché')) AS equal_lengths;
LENGTH and CHAR_LENGTH get bytes and characters. Use = for comparison in SQL.