MySQL like() Function17 Mar 2025 | 1 min read Like(str) is a Sring function of MySQL. In this method, we check for pattern matching. This method returns 1 or 0. SyntaxExample 1Output: ![]() Example 2Output: ![]() Example 3Output: ![]() Next TopicMySQL String |
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 Trim() Function The trim() is a String function of MySQL. This function removes the blank spaces from the head and tail of the given string. Syntax TRIM( [ LEADING | TRAILING | BOTH ] [ trim_character FROM ] string ) Parameter: str: string to be trimmed leading: it removes blank spaces...
1 min read
MySQL POSITION() Function POSITION(substr IN str) is a Sring function of MySQL. This method returns position of the given sub string in string. Syntax select position(substr in str) Example 1 select position('point' in 'Javatpoint'); Output: Example 2 select position('string' in 'mysql_string_function'); Output: TopicMySQL String ...
1 min read
MySQL ORD() Function ORD(str) is a Sring function of MySQL This method returns code for the given string. Syntax select ord(str); Example 1 Select ord('mysql'); Output: Example 2 Select ord('mysql'); 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 MAKE_SET() Function MAKE_SET(bits,str1,str2,...) is a Sring function of MySQL. This method returns values from set for the given bit. Syntax select make_set(bits, str1, str2,...); Example 1 Select make_set(1, 'apple','mango','grapes'); Output: Example 2 Select make_set(1|3, 'apple','mango','grapes'); Output: Example 3 Select make_set(1|4, 'apple','mango','grapes'); Output: Example 4 Select make_set(4, 'apple','mango','grapes'); Output: TopicMySQL 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 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 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 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
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