MySQL RPAD() Function17 Mar 2025 | 1 min read The RPAD() is a String function of MySQL. This method returns the given string which is right-padded with the string padstr to the given length (len). SyntaxParametersstr: string to be right padded rpad: length of the padding padstr: string to be padded ReturnsThis function returns a string that is right-padded with a specified string to a certain length. Example 1Output: ![]() Example 2Output: ![]() Next TopicMySQL String |
MySQL LEFT() Function LEFT(str,len) is a Sring function of MySQL. This method returns left side 'len' characters from the given string 'str'. Syntax select LEFT(str,len) Example 1 select left('Javatpoint',4); Output: Example 2 select left('MY SQL STRING FUNCTION',6); 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
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 like() Function Like(str) is a Sring function of MySQL. In this method, we check for pattern matching. This method returns 1 or 0. Syntax select (str) like (pattern); Example 1 Select 'JAVA' like 'java'; Output: Example 2 Select 'JAVA' like 'java '; Output: Example 3 Select 'MySql' like 'mysql'; Output: TopicMySQL String ...
1 min read
MySQL CONCAT() Function Concat() is a Sring function of MySQL This method returns a string by concatenating all the arguments. It can have more than one argument. Syntax select concat('arg1','arg2','arg3',....); Example 1 select concat('java','t','point'); Output: Example 2 select concat('m','y','s','q','l'); 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 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 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 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
MySQL LENGTH() Function LENGTH(str) is a Sring function of MySQL. This method returns length of the given string ?str? which is measured in bytes. Syntax select LENGTH(str); Example 1 select length('Javatpoint'); Output: Example 2 select length('MY SQL STRING FUNCTION'); 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