HTML tutorial
CSS3 tutorial
Bootstrap tutorial
JavaScript tutorial
JQuery tutorial
AngularJS tutorial
React tutorial
NodeJS tutorial
PHP tutorial
Python tutorial
Python3 tutorial
Django tutorial
Linux tutorial
Docker tutorial
Ruby tutorial
Java tutorial
C tutorial
C ++ tutorial
Perl tutorial
JSP tutorial
Lua tutorial
Scala tutorial
Go tutorial
ASP.NET tutorial
C # tutorial
Search for "q" within the list of strings
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");
Search for "q" within the list of strings (string list is NULL):
SELECT FIND_IN_SET("q", null);