简体   繁体   中英

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)
I would like to know the location of 'a' in that specific 'AGenName' (case sensitive. 6. not 1)

Saw some general examples with binary, position, strIndex, collate etc,
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..)

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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