MySQL INSERT() Function17 Mar 2025 | 1 min read 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 newstr. SyntaxExample 1Output: ![]() Example 2Output: ![]() Next TopicMySQL String |
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 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 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 ELT() Function Elt() function is a Sring function of MySQL. This method Nth element from the list of string. Syntax select elt(N,str1,str2,str3,...) Example 1 select elt(3,'this','is','javatpoint','website') Output: Example 2 select elt(4,'my','sql','string','function') Output: TopicMySQL String ...
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 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
MySQL FIELD() Function Field(str,str1,str2,str3,....) is a Sring function of MySQL. This method returns the index of string. Syntax select field(str,str1,str2,str3,...) Example 1 Selct field('a','b','c','d','a'); Output: Example 2 Selct field(4,1,2,3,5,4,6); Output: Example 3 Selct field(12,1,2,3,4,6); Output: TopicMySQL 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
MySQL FROM_BASE64() Function From_base64(str) is a Sring function of MySQL. This method encode the given string to binary formate. Syntax select from_base64(str) ; Example 1 Select from_base64('java') as 'Input'; Output: Example 2 Select from_base64('mysql') as 'output'; Output: TopicMySQL String ...
1 min read
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
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