MySQLÂ includes a FIELD()
function and a FIND_IN_SET()
function that both return the position of a string within a list. However, these functions work slightly differently to each other.
The main difference between these two functions is this:
FIND_IN_SET()
returns the index position of a string within a string list.FIELD()
returns the index position of a string within a list of arguments.
So one function searches a string list, and the other function searches a list of arguments.