FIND_IN_SET(string,string_set)

Description: If string_set is a string consisting of a set of comma-separated values, function returns a 1 if string matches the first item in the set, 2 for the second, and so on.

Works most efficiently if string_set is a column of type SET because it then uses bit arithmetic. Returns 0 if string is not found in string_set or string_set is the empty string, or NULL if either argument is NULL. Note that string may not contain a comma (,).

Example:

  • FIND_IN_SET('c','a,b,c,d,e') returns 3.

See also: EXPORT_SET(), MAKE_SET()

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.142.156.202