CHAR_LENGTH() Function in MySQL Last Updated : 21 Jun, 2022 Comments Improve Suggest changes Like Article Like Report CHAR_LENGTH() function in MySQL is used to find the length of a given string (in characters). It counts the number of characters and ignore whether the character(s) are single-byte or multi-byte. Syntax : CHAR_LENGTH(str) Parameter : This method accepts one parameter as mentioned above and described below : str : A string whose length to be calculated. Returns : It returns the length of a given string. Example-1 : CHAR_LENGTH() function to find the length for a String. SELECT CHAR_LENGTH("geeksforgeeks") AS LengthOfString Output : LengthOfString13 Example-2 : CHAR_LENGTH() function to find the length for a String. SELECT CHAR_LENGTH("SQL Tutorial in geeksforgeeks") AS LengthOfString Output : LengthOfString29 Example-3 : CHAR_LENGTH() function to find the length for every String in a column of a Table. Table - Student_Details : Student_RollStudent_NameTotal_Marks1Amit4502Aniket4703Sanjana4324Nirmal475SELECT CHAR_LENGTH(Student_Name) AS LengthOfName FROM Student_Details; Output : LengthOfName4676 Comment More infoAdvertise with us Next Article CHAR_LENGTH() Function in MySQL J jana_sayantan Follow Improve Article Tags : SQL DBMS-SQL mysql Similar Reads CHARACTER_LENGTH() Function in MySQL CHARACTER_LENGTH() : This function in MySQL helps to find the length of given string. The length is measured in form of characters. Moreover, CHARACTER_LENGTH() is also the synonym of CHAR_LENGTH() function. Syntax : CHARACTER_LENGTH(string) Parameter : The function accepts only one parameter as fol 1 min read BIT_LENGTH() Function in MySQL BIT_LENGTH() function in MySQL is used to find the length of a given string in bits. The input string can be a character string or number string. Syntax : BIT_LENGTH(str) Parameter : Required. str : A string whose bits length to be calculated. Returns : It returns the length of a given string in bit 1 min read MySQL LENGTH() Function MySQL LENGTH() function returns the length of a string in bytes. SyntaxThe MySQL LENGTH function syntax is: LENGTH(string) ParametersThe LENGTH function accepts only one parameter. string: A specified string whose length is to be counted.MySQL LENGTH() Function ExamplesLet's look at examples of the 1 min read LEFT() Function in MySQL The LEFT() function in MySQL is used to extract a specified number of characters from the left side of a given string. It uses its second argument to decide, how many characters it should return. Syntax: LEFT (str, len)Parameter: This function accepts two parameters as mentioned above and described 1 min read OCTET_LENGTH() Function in MySQL In this article, we are going to cover the OCTET_LENGTH function. And will see syntax and example of OCTET_LENGTH function. Let's discuss one by one. OCTET_LENGTH function in MySQL is used to returns the number of characters in a given string. Syntax : OCTET_LENGTH( str ) Parameter : This function a 1 min read Like