We can use the FIELD() function to find the index position of a specific string from a list of strings.
FIELD(str search,String1, String2,…StringN)
Here, str search is the index number of the string we want to search, and String1, String...StringN are the list of strings where the search will occur.
mysql> Select FIELD('good', 'Ram', 'is', 'a', 'good', 'boy')AS 'Index Number of good'; +----------------------+ | Index Number of good | +----------------------+ | 4 | +----------------------+ 1 row in set (0.00 sec)
The above is the detailed content of In MySQL, which function can we use to find the index position of a specific string from a list of strings?. For more information, please follow other related articles on the PHP Chinese website!