In MySQL the FIND_IN_SET() returns the position of a string when it present within a list of strings.
The string list itself is a string contains substrings separated by ‘,’ (comma) character.
The return value 0 when search string does not exist in the string list.
The return value is NULL if either of the arguments is NULL.
Syntax :
FIND_IN_SET (search string, string list)
The string list itself is a string contains substrings separated by ‘,’ (comma) character.
The return value 0 when search string does not exist in the string list.
The return value is NULL if either of the arguments is NULL.
Syntax :
FIND_IN_SET (search string, string list)
Example
SELECT FIND_IN_SET('ank','b,ank,of,monk');
No comments:
Post a Comment