MySQL SUBSTR() Function17 Mar 2025 | 1 min read The substr() is a String function of MySQL. This function returns the substring from the given string. SyntaxParameter:Str: Main string Len: length for substring Pos: position the start the substring from the given string. Example 1Output: ![]() Example 2Output: ![]() Example 3Output: ![]() Example 4Output: ![]() Next TopicMySQL String |
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 SOUNDEX() Function The Soundex() is a String function of MySQL. This method returns a Soundex string. Two strings which sound almost same should have identical soundex strings. Syntax select soundex(str); Example 1 Select soundex('javatpoint'); Output: Example 2 Select soundex('mysql'); Output: TopicMySQL String ...
1 min read
MySQL UNHEX() Function The unhex() is a String function of MySQL. This function converts the hexadecimal value into a string. Syntax select unhex(str); Parameter: str: hexadecimal value. Example 1 Select unhex('6a61766174706f696e74'); Output: Example 2 Select unhex('4d7953716c537472696e6746756e6374696f6e'); 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 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 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 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
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 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 FORMAT() Function Format(X,D[,locale]) is a Sring function of MySQL. This method formats the number X to round of D decimal place Syntax select format(X,D[locale]); Example 1 select format(12345.6789,3); Output: Example 2 select format(7895.563,3); Output: Example 3 select format(4539.235,2); 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