MySQL STRCMP() Function17 Mar 2025 | 1 min read 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. SyntaxParameters:Str1 and str2: two strings to be compared Returns:
Example 1Output: ![]() Example 2Output: ![]() Example 3Output: ![]() Next TopicMySQL String |
MySQL CHARACTER_LENGTH() Function Character_Length (str) function is a Sring function of MySQL. This method is same as char_length() function which returns size of given string. Syntax select character_length(str); Example 1 select character_length('javatpoint'); Output: Example 2 select character_length('mysql'); 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 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 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
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 REVERSE(str) Function The REVERSE() is a String function of MySQL. This method returns the given string in reverse order. Syntax select reverse(str); Parameter str: string to be reversed Returns This function returns a string with the characters in reverse order. Example 1 Select reverse('javatpoint'); Output: Example 2 Select reverse('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 INSTR() Function INSTR(str,substr) is a Sring function of MySQL. This method return 1st occurrence of substring substr in string str. Syntax select instr(str,substr); Example 1 Select instr('Javanpoint',5,1,'t'); Output: Example 2 Select instr('MySql-Function',6,1,'String'); 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 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
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