MySQL 中的 FIELD() 函数

首页 / MySQL入门教程 / MySQL 中的 FIELD() 函数

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

祝学习愉快!(内容编辑有误?请选中要编辑内容 -> 右键 -> 修改 -> 提交!)

技术教程推荐

大规模数据处理实战 -〔蔡元楠〕

Elasticsearch核心技术与实战 -〔阮一鸣〕

DDD实战课 -〔欧创新〕

NLP实战高手课 -〔王然〕

成为AI产品经理 -〔刘海丰〕

恋爱必修课 -〔李一帆〕

超级访谈:对话玉伯 -〔玉伯〕

技术领导力实战笔记 2022 -〔TGO 鲲鹏会〕

徐昊 · AI 时代的软件工程 -〔徐昊〕

好记忆不如烂笔头。留下您的足迹吧 :)