Search for "q" within the list of strings:
SELECT FIND_IN_SET("q", "s,q,l");
Try it Yourself »
The FIND_IN_SET() function returns the position of a string within a list of strings.
FIND_IN_SET(
string,
string_list)
Parameter | Description |
---|---|
string | Required. The string to search for |
string_list | Required. The list of string values to be searched (separated by commas) |
Works in: | From MySQL 4.0 |
---|
Search for "a" within the list of strings:
SELECT FIND_IN_SET("a", "s,q,l");
Try it Yourself »
Search for "q" within the list of strings (string list is NULL):
SELECT FIND_IN_SET("q", null);
Try it Yourself »
截取页面反馈部分,让我们更快修复内容!也可以直接跳过填写反馈内容!