mysql中文欄位轉拼音首字母,以及中文拼音模糊查詢
建立儲存過程,將中文欄位轉拼音首字母
1 2 3 4 5 6 7 8 9 10 |
|
中文轉拼音
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
|
select
upper(pinyin(user_name))
as
un,user_name
from
ecs_users
where
user_id=63 and upper(pinyin(user_name)) like
'%c%'
;