field(str,str1,str2,str3,....)是MySQL的一个字符串函数。此方法返回字符串的索引。
语法
select field(str,str1,str2,str3,...)
示例 1
Selct field('a','b','c','d','a');
输出:

示例 2
Selct field(4,1,2,3,5,4,6);
输出:

示例 3
Selct field(12,1,2,3,4,6);
输出:

field(str,str1,str2,str3,....)是MySQL的一个字符串函数。此方法返回字符串的索引。
select field(str,str1,str2,str3,...)
Selct field('a','b','c','d','a');
输出:
Selct field(4,1,2,3,5,4,6);
输出:
Selct field(12,1,2,3,4,6);
输出: