![Trending Articles on Technical and Non Technical topics](/images/trending_categories.jpeg)
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
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. ‘.’.
Advertisements