Flash cards
Review the key moves
1/4
Core idea
What is the main idea behind MySQL FIND_IN_SET() Function?
Lesson checks
Practice each idea before moving on
Short Mimo-style checks built from this lesson's code, terms, and sequence.
1Quick choice
Which statement best captures the main point of this lesson?
2Fill blank
Complete the missing token from the example code.
___ FIND_IN_SET("q", "s,q,l");3Order
Put the learning moves in the order that makes the concept easiest to apply.
The FIND_IN_SET() function returns the position of a string within a list of strings.
Definition and Usage
MySQL FIND_IN_SET() Function
Example
SELECT FIND_IN_SET("q", "s,q,l");Definition and Usage
The FIND_IN_SET() function returns the position of a string within a list of strings.
Syntax
FIND_IN_SET(
string
,
string_list
)Parameter Values
| Parameter | Description |
|---|---|
| string | Required. The string to search for |
| string_list | Required. The list of string values to be searched (separated by commas) |
Return Values
- If string is not found in string_list , this function returns 0
- If string or string_list is NULL, this function returns NULL
- If string_list is an empty string (""), this function returns 0
Technical Details
| Works in: | From MySQL 4.0 |
|---|