Syntax\n------\n\nLENGTH(str)\n\nDescription\n-----------\n\nReturns the length of the string str.\n\nIn the default mode, when Oracle mode is not set, the length is measured in bytes. In this case, a multi-byte character counts as multiple bytes. LENGTH() returns the length in bytes, whereas CHAR_LENGTH() returns the number of characters. This means that, for a string containing five two-byte characters, LENGTH() returns 10, whereas CHAR_LENGTH() returns 5.\nWhen running Oracle mode, the length is measured in characters, and LENGTH is a synonym for CHAR_LENGTH().\n\nIf str is not a string value, it is converted into a string. If str is NULL, the function returns NULL.\n\nExamples\n--------\n\nSELECT LENGTH('MariaDB');\n+-------------------+\n| LENGTH('MariaDB') |\n+-------------------+\n|                 7 |\n+-------------------+\n\nURL: https://mariadb.com/docs/server/reference/sql-functions/string-functions/length