
- Learn MySQL
- MySQL - Home
- MySQL - Introduction
- MySQL - Installation
- MySQL - Administration
- MySQL - PHP Syntax
- MySQL - Connection
- MySQL - Create Database
- MySQL - Drop Database
- MySQL - Select Database
- MySQL - Data Types
- MySQL - Create Tables
- MySQL - Drop Tables
- MySQL - Insert Query
- MySQL - Select Query
- MySQL - Where Clause
- MySQL - Update Query
- MySQL - Delete Query
- MySQL - Like Clause
- MySQL - Sorting Results
- MySQL - Using Join
- MySQL - NULL Values
- MySQL - Regexps
- MySQL - Transactions
- MySQL - Alter Command
- MySQL - Indexes
- MySQL - Temporary Tables
- MySQL - Clone Tables
- MySQL - Database Info
- MySQL - Using Sequences
- MySQL - Handling Duplicates
- MySQL - SQL Injection
- MySQL - Database Export
- MySQL - Database Import
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)
- Related Articles
- How can we use FIND_IN_SET() function with MySQL WHERE clause?
- In MySQL, how FIELD() function is different from FIND_IN_SET() function?
- What is the use of LOCATE() function in MySQL?
- When MySQL FIND_IN_SET() function returns NULL as output?
- What is the use of MySQL UNHEX() function?
- What is the use of MySQL CHAR() function?
- What is the use of MySQL FROM_UNIXTIME() function?
- What is the use of MySQL GET_FORMAT() function?
- What is the use of MySQL LAST_INSERT_ID() function?
- What is the use of MySQL CONCAT_WS() function?
- What is the use of MySQL TRUNCATE() function?
- What is the use of MySQL SUBSTRING_INDEX() function?
- What is the difference between MySQL LOCATE() and FIND_IN_SET() functions?
- What is the difference between MySQL INSTR() and FIND_IN_SET() functions?
- What is the use of MySQL IFNULL() control flow function?

Advertisements