无涯教程-MySQL - FIELD() 函数

11 阅读1分钟

Field(str,str1,str2,str3,....)是MySQL的String函数。此方法返回字符串的索引。

语法

select field(str,str1,str2,str3,...)

例子1

Selct field(a,b,c,d,a);

输出

MySQL String FIELD() Function

例子2

Selct field(4,1,2,3,5,4,6);

输出

MySQL String FIELD() Function

例子3

Selct field(12,1,2,3,4,6);

输出

MySQL String FIELD() Function

参考链接

www.learnfk.com/mysql/mysql…