- Trending Categories
- 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
What is the use of FIND_IN_SET () function in MySQL?
FIND_IN_SET() function, as name specified, is used to search the specified string from the list of string. Basically it returns the position of a string, if it is present (as a substring), within a list of strings.
Syntax
FIND_IN_SET(Search String, string list)
Here, search string is the string which is to be searched and string list is the string that contains the substrings separated by commas.
Example
mysql> Select FIND_IN_SET('good','Ram,is,a,good,boy'); +-----------------------------------------+ | FIND_IN_SET('good','Ram,is,a,good,boy') | +-----------------------------------------+ | 4 | +-----------------------------------------+ 1 row in set (0.00 sec)
Advertisements