Oracle:
New in oracle9i, according to pinyin, radicals, stroke sorting function. Setting the Nls_sort value
Schinese_radical_m Sort by radical (first order), stroke (second order)
Schinese_stroke_m Sort by stroke (first order), radical (second order)
Schinese_pinyin_m by phonetic sorting, the default sorting method for the system is phonetic sorting
Examples are as follows:
The table name is dept, where the Name field is Chinese and the following are sorted by the stroke, radicals, and pinyin of the unit name.
Sort by stroke
SELECT * FROM Dept ORDER by Nlssort (name, ' Nls_sort=schinese_stroke_m ');
Sort by radical
SELECT * FROM Dept ORDER by Nlssort (name, ' Nls_sort=schinese_radical_m ');
Sort by pinyin, this is the default sort method for the system
SELECT * FROM Dept ORDER by Nlssort (name, ' Nls_sort=schinese_pinyin_m ');
Sql server
SELECT * FROM table order by name collate Chinese_prc_cs_as_ks_ws
Execution Result: SELECT * from Table where catefid=0 order by Catename collate Chinese_prc_cs_as_ks_ws
@ Chen Wolong's blog
C # Get the first letter of Chinese pinyin