简体   繁体   English

在特定数据中获取字母位置区分大小写

[英]get letter location case sensitive in a specific data

in a db (someName), in a table (worker) in a column (first_name) there is a field (AGenName)在 db (someName) 中,在表 (worker) 中的列 (first_name) 中有一个字段 (AGenName)
I would like to know the location of 'a' in that specific 'AGenName' (case sensitive. 6. not 1)我想知道特定“AGenName”中“a”的位置(区分大小写。6。不是 1)

Saw some general examples with binary, position, strIndex, collate etc,看到了一些带有二进制、位置、strIndex、整理等的一般示例,
but they where all high Level.但是他们那里的所有级别都很高。
I would like to learn how to use them on a -specific- field.我想学习如何在特定领域使用它们。
like, perhaps somewhere in a sentence like -就像,也许在句子中的某个地方,例如-

select first_name from worker where first_name = AGenName

Thnx for the help谢谢帮助

got this from a friend.这是从朋友那里得到的。 Simple and easy: (on her DB firstName = 'Amitabh', so..)简单易行:(在她的 DB 上 firstName = 'Amitabh',所以..)

select instr(binary first_name, binary'a') from worker where firstName = 'Amitabh';

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM