Get the App
SLTechnology News&Howtos  ›  Database  › 

ORACLE Postgresql Chinese sorting

Shulou Source: shulou.com Published: 2022-06-01 13:03:04 10月04日 Update

When our order sorting can't achieve what we want, try the function NLSSORT.

He sorts not only by last name, but also by first name:

Nls_param is used to specify language features in the format nls_sort = sort,nls_ sort with values of:

Sort by radical: SCHINESE_RADICAL_M

Sort by stroke: SCHINESE_STROKE_M

Sort by Pinyin: SCHINESE_PINYIN_M

TEST=# select * from helei order by nlssort (name,'NLS_SORT= SCHINESE_PINYIN_M')

NAME

-

A Hong

Cao Li

Chen Lu

Chen Nan

Chen Zhe

Hatred of three

The first year of junior high school

Chu Zhe

He Li

Wang Ming

Tags: Sort not only content function last name pinyin time format feature stroke language radical Wang Ming Chen Zhe Chen Nan try Chinese Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Shulou Technology Linux MariaDB NVidia Shulou Tech Info