- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Social Studies
Fashion Studies
Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
When MySQL SUBSTRING_INDEX() function returns the same string, provided in the argument, as output?
MySQL SUBSTRING_INDEX() function will return the same string as output if the argument ‘count’ has the value greater than the total number of occurrences of delimiter. It can be demonstrated with the following example −
mysql> Select SUBSTRING_INDEX('www.google.co.in','.',4); +-------------------------------------------+ | SUBSTRING_INDEX('www.google.co.in','.',4) | +-------------------------------------------+ | www.google.co.in | +-------------------------------------------+ 1 row in set (0.00 sec)
The above query returns the same string because 4 is greater than the total number of occurrences of delimiter provided as argument i.e. ‘.’.
- Related Articles
- Which function in MySQL returns the same output as BIN() function?
- When MySQL LOCATE() function returns NULL as the output?
- When MySQL FIND_IN_SET() function returns NULL as output?
- What MySQL returns if the search string is not in the list of strings provided as argument in FIELD() function?
- What MySQL returns if the list of strings, provided as argument in FIELD() function, are NULL?
- How MySQL SUBSTRING_INDEX() function returns the substring if we provide the negative value of the argument ‘count’?
- What MySQL ELT() function returns if we the index number, provided as an argument, is less than 1?
- What MySQL ELT() function returns if the index number, provided as an argument, is higher than the number of strings?
- What MySQL returns if the search string, provided in FIELD() function, is NULL?
- What MySQL returns on passing an invalid string as an argument to STR_TO_DATE() function?
- What would be the output of MySQL ELT() function if the index number, provided as an argument, is not an integer?
- How can I use SUBSTRING_INDEX() function to get the substring as output which is between two same delimiters in a string?
- Which MySQL function returns a specified number of characters of a string as output?
- What MySQL returns if the argument of QUOTE() function is NULL?
- When MySQL IN() function returns NULL?

Advertisements