MySQL SPACE() Function17 Mar 2025 | 1 min read The space() is a String function of MySQL. This function returns the given number (n) of blank spaces. SyntaxParameters:N: number of spaces to be returned. ReturnsThis function returns a string with a specified number of spaces. Example 1Output: ![]() Example 2Output: ![]() Next TopicMySQL String |
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 LOAD_FILE() Function LOAD_FILE(file_name) is a Sring function of MySQL. This method returns content of file. If file does not exist or it cannot be read then it returns NULL. Syntax LOAD_FILE(file_name); Example 1 Update table1 set img= LOAD_FILE('D:\image_file.jpg'); Output: TopicMySQL String ...
1 min read
MySQL LCASE() Function LCASE(str) is a Sring function of MySQL. This method returns string in lower case. Syntax select lcase('JAVATPOINT'); Example 1 select lcase('JAVATPOINT'); Output: Example 2 select lcase('MY SQL STRING FUNCTION'); Output: TopicMySQL String ...
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 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 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 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 EXPORT_SET() Function Export_set() is a Sring function of MySQL. This method returns string for each bit set. Syntax select export_set(bits,on,off[,separator[,number_of_bits]]); Example 1 select export_set(5, 'Yes','No',',',4); Output: Example 2 select export_set(5, 'hello','bye',',',4); Output: TopicMySQL String ...
1 min read
MySQL FIND_IN_SET() Function Find_in_set(str,strlist) is a Sring function of MySQL. This method return the value of the string which is given in first position in argument. Syntax select find_in_set(str, 'str1, str2,...'); Example 1 Select find_in_set('a','b,c,d,a'); Output: Example 2 Select find_in_set(4,'1,2,3,5,4,6'); Output: Example 3 Select find_in_set(12,'1,2,3,4,6'); 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
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