MySQL LEFT() Function17 Mar 2025 | 1 min read LEFT(str,len) is a Sring function of MySQL. This method returns left side 'len' characters from the given string 'str'. SyntaxExample 1Output: ![]() Example 2Output: ![]() Next TopicMySQL String |
MySQL LOCATE() Function LOCATE(substr,str) is a Sring function of MySQL. This method returns the first occurrence of given substr in the given string, Syntax select locate(substr, str); Example 1 select locate('point', 'javatpoint'); Output: Example 2 select locate('sql, 'mysql'); Output: TopicMySQL String ...
1 min read
MySQL RIGHT() Function The Right() is a String function of MySQL. This method returns allows you to extract a substring from a string, starting from the right side of the string. Syntax select right(str, len); Parameters Str: string to be extracted. Len: length of character to be extracted. Returns This function will return the...
1 min read
MySQL INSERT() Function INSERT(str,pos,len,newstr) is a Sring function of MySQL. In this method, a string str is passed with a position 'pos' which tells at which position the character is to be placed, and 'len' length is the length of the character to be placed i.e string...
1 min read
MySQL SPACE() Function The space() is a String function of MySQL. This function returns the given number (n) of blank spaces. Syntax select space(n); Parameters: N: number of spaces to be returned. Returns This function returns a string with a specified number of spaces. Example 1 select space(5); Output: Example 2 select space(10); Output: TopicMySQL String ...
1 min read
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 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 SUBSTRING_INDEX() Function The substring_index() is a String function of MySQL. This function returns a substring from the given string(str) before the counts come of the delimiter. Syntax select substring_index(str, delim, count); Parameter: str: main string delim: string to be searched count: number of times to search delim Returns: This function returns the substring of...
1 min read
MySQL QUOTE() Function Quote(str) is a Sring function of MySQL. This method returns the string which is passed in single quote. Syntax select quote(str); Example 1 select quote('javatpoint is a website'); Output: Example 2 select quote('mysql String function'); 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 SUBSTRING() Function The substring() is a String function of MySQL. This function returns the substring from the given string. Syntax select substring(Str, pos); Select substring(Str from pos); Select substring(Str, pos, len); Select substring(Str from pos for len); Parameter: Str: Main string Len: length for substring Pos: position the start the substring from the given string. Example...
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