MySQL LENGTH() Function17 Mar 2025 | 1 min read LENGTH(str) is a Sring function of MySQL. This method returns length of the given string ?str? which is measured in bytes. SyntaxExample 1Output: ![]() Example 2Output: ![]() Next TopicMySQL String |
MySQL LTRIM() Function LTRIM(str) is a Sring function of MySQL. This method returns string by removing leading space. Syntax select ltrim(str); Example 1 Select ltrim(' Javatpoint'); Output: Example 2 Select ltrim(' MySql '); Output: TopicMySQL String ...
1 min read
MSQL CONCAT_WS() Function Concat_ws() is a Sring function of MySQL. This method has a separator and returns a string by concatenating arguments using separator. It can have more than one argument. Syntax select concat_ws(separator,str1,str2,...); Example 1 select concat_ws(',','Id','Password','Name'); Output: Example 2 select concat_ws(',','Name','Class','School'); Output: TopicMySQL String ...
1 min read
MySQL MID() Function MID(str,pos,len) is a Sring function of MySQL. This method returns string of given length and position. Syntax select mid(str, pos, len); Example 1 Select mid('mysql', 3, 4); Output: Example 2 Select mid('Javatpoint', 6, 6); Output: TopicMySQL String ...
1 min read
MySQL OCT() Function Oct(n) is a Sring function of MySQL. This method returns octal value of given number (n). Syntax select oct(n); Example 1 select oct(10); Output: Example 2 select oct(123); Output: TopicMySQL String ...
1 min read
MySQL STRCMP() Function The strcmp() is a String function of MySQL. This function compares the given two strings. This function returns 0 if both the strings are same, -1 if the first string is smaller than second else it returns 1. Syntax select strcmp(str1, str2); Parameters: Str1 and str2: two strings...
1 min read
MySQL ELT() Function Elt() function is a Sring function of MySQL. This method Nth element from the list of string. Syntax select elt(N,str1,str2,str3,...) Example 1 select elt(3,'this','is','javatpoint','website') Output: Example 2 select elt(4,'my','sql','string','function') Output: TopicMySQL String ...
1 min read
MySQL RTRIM() Function The Rtrim() is a String function of MySQL. This method removes the extra space if present in the tail of the string. Syntax select rtrim(str); Parameters Str: string for which extra space is to be removed from the tail. Example 1 Select rtrim('javatpoint '); Output: Example 2 Select rtrim('mysql ...
1 min read
MySQL FORMAT() Function Format(X,D[,locale]) is a Sring function of MySQL. This method formats the number X to round of D decimal place Syntax select format(X,D[locale]); Example 1 select format(12345.6789,3); Output: Example 2 select format(7895.563,3); Output: Example 3 select format(4539.235,2); Output: TopicMySQL String ...
1 min read
MySQL FIELD() Function Field(str,str1,str2,str3,....) is a Sring function of MySQL. This method returns the index of string. Syntax select field(str,str1,str2,str3,...) Example 1 Selct field('a','b','c','d','a'); Output: Example 2 Selct field(4,1,2,3,5,4,6); Output: Example 3 Selct field(12,1,2,3,4,6); Output: TopicMySQL String ...
1 min read
MySQL LOWER() Function LOWER(str) is a Sring function of MySQL. This method returns the given string in lower case. Syntax select lower(str); Example 1 Select lower('JAVATPOINT'); Output: Example 2 Select lower('MYSQL'); Output: TopicMySQL String ...
1 min read
We request you to subscribe our newsletter for upcoming updates.
We provides tutorials and interview questions of all technology like java tutorial, android, java frameworks
G-13, 2nd Floor, Sec-3, Noida, UP, 201301, India