MySQL SUBSTRING() Function17 Mar 2025 | 1 min read The substring() is a String function of MySQL. This function returns the substring from the given string. SyntaxParameter:Str: Main string Len: length for substring Pos: position the start the substring from the given string. Example 1Output: ![]() Example 2Output: ![]() Example 3Output: ![]() Example 4Output: ![]() Next TopicMySQL String |
MySQL REPEAT() Function REPEAT(str,count) is a Sring function of MySQL. This method returns the string reputation counter times. Syntax select repeat(str, count); Example 1 select repeat('javatpoint ', 4); Output: Example 2 select repeat('mysql ', 2); 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 HEX(str), HEX(N) Function Hex() is a Sring function of MySQL. This method return in hexadecimal string of given number or String. Syntax select hex(S or N) Example 1 Select hex('a'); Output: Example 2 Select hex('b'); Output: Example 3 Select hex('c'); Output: TopicMySQL String ...
1 min read
MySQL LPAD() Function LPAD(str,len,padstr) is a Sring function of MySQL. This method returns string 'str' which is left padded to the given length. Syntax select lpad(str, len, padstr) Example 1 Select lpad('java', 2, '**'); Output: Example 2 Select lpad('mysql', 3, '**'); Output: TopicMySQL String ...
1 min read
MySQL REPLACE() Function REPLACE(str,from_str,to_str) is a Sring function of MySQL. This method returns string from the given string to the string. Syntax select replace(str, from_str, to_str); Example 1 select replace('java', 'javat', 'javatpoint'); Output: Example 2 select replace('MYSQL', 'sql', 'mysql'); Output: TopicMySQL String ...
1 min read
MySQL OCTET_LENGTH() Function OCTET_LENGTH(str) is a Sring function of MySQL. This method returns length of given string. Syntax select octet_length(str); Example 1 select octet_length('Javatpoint'); Output: Example 2 select octet_length('mysql); 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 UPPER() Function The upper() is a String function of MySQL. This function returns the string in upper case. Syntax select upper(str) Parameter: Str: string to be converted Returns: This function returns the string in upper case. Example 1 Select upper('javatpoint'); Output: Example 2 Select upper('mysql'); Output: TopicMySQL String ...
1 min read
MySQL SOUNDEX() Function The Soundex() is a String function of MySQL. This method returns a Soundex string. Two strings which sound almost same should have identical soundex strings. Syntax select soundex(str); Example 1 Select soundex('javatpoint'); Output: Example 2 Select soundex('mysql'); 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