Get the App
SLTechnology News&Howtos  ›  Database  › 

SQL gets the first letter of the field string

Shulou Source: shulou.com Published: 2022-06-01 11:17:40 11月18日 Update

Have Chinese and English, get Chinese initials information.

SELECT person_name_cn

ELT (INTERVAL (CONV (HEX (LEFT (CONVERT (person_name_cn USING gbk), 1)), 1610)

0xB0A1,0xB0C5,0xB2C1,0xB4EE,0xB6EA,0xB7A2,0xB8C1,0xB9FE,0xBBF7

0xBFA6,0xC0AC,0xC2E8,0xC4C3,0xC5B6,0xC5BE,0xC6DA,0xC8BB,0xC8F6

0xCBFAB0xCDDAdicol 0xCEF4rec 0xD1B9pr 0xD4D1)

'Aphrodite,' Bobby,''Bai,' 'Che,' 'Equ,' Fong,''Gai,' 'Gai,' 'Jai,' Kang,''Lai,' Lai, 'and',',

'Qothers, Z',' AS PY,''

FROM person WHERE LEFT (person_name_cn,1) NOT IN ('Achilles Permian, Bengal, Centraly, Dharma, Fideli, Geddales, Gracias, Hutchison, Hutchison, Kleptoe, Kleptocrys, Lhasa, Mumpies, Oppies, P'

'Qothers, pencils, pundits, squares, squares, pageants, winters, winters, Xlies, pageants, yams, Z')

Tags: Letters Chinese information Chinese English fields characters strings Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Xiaomi Docker MySQL Huawei Shulou Information