当前位置:网站首页>Oracle Chinese sorting Oracle Chinese field sorting
Oracle Chinese sorting Oracle Chinese field sorting
2022-07-05 18:47:00 【HaHa_ Sir】
Oracle Chinese sorting Oracle Chinese field sort
One 、 Scenario description
1、 In actual development , Encountering field sorting , About the following :

2、 The demand of positive order is : A class 、 Two category 、 Three types of ; The reverse order requirement is : Three types of 、 Two category 、 A class .
3、 As you can see from the diagram , Use the default sort , Can't achieve the expected effect , that Oracle in , How to deal with Chinese sorting ?
Two 、 Problem solving
1、 Use nlssort function , Solve the problem of Chinese sorting .
2、Oracle9i Before , Chinese is sorted according to the binary code . stay oracle9i According to Pinyin added in 、 Radicals 、 Stroke sorting function . Set up NLS_SORT value :
- SCHINESE_RADICAL_M : According to the radical ( The first order )、 stroke ( The second order ) Sort
- SCHINESE_STROKE_M : According to the stroke ( The first order )、 Radicals ( The second order ) Sort
- SCHINESE_PINYIN_M : Sort by Pinyin , The default sorting method of the system is Pinyin sort
3、 Examples are as follows :
// 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 sorting method of the system
select * from dept order by nlssort(name,'NLS_SORT=SCHINESE_PINYIN_M');
4、 Screenshot of the case :

边栏推荐
- 技术分享 | 接口测试价值与体系
- 线性表——抽象数据类型
- Is it safe for golden sun to open an account? Can I open an account free of 5 in case?
- 2022全网最全的腾讯后台自动化测试与持续部署实践【万字长文】
- The easycvr authorization expiration page cannot be logged in. How to solve it?
- 集合处理的利器
- The 11th China cloud computing standards and Applications Conference | China cloud data has become the deputy leader unit of the cloud migration special group of the cloud computing standards working
- A2L file parsing based on CAN bus (3)
- The worse the AI performance, the higher the bonus? Doctor of New York University offered a reward for the task of making the big model perform poorly
- Reptile 01 basic principles of reptile
猜你喜欢

Use of websocket tool

How much does the mlperf list weigh when AI is named?

IDEA配置npm启动

The 2022 China Xinchuang Ecological Market Research and model selection evaluation report released that Huayun data was selected as the mainstream manufacturer of Xinchuang IT infrastructure!

《ClickHouse原理解析与应用实践》读书笔记(5)

LeetCode 6111. 螺旋矩阵 IV

2022年阿里Android高级面试题分享,2022阿里手淘Android面试题目

MySQL优化六个点的总结

5. 数据访问 - EntityFramework集成

面试官:Redis 过期删除策略和内存淘汰策略有什么区别?
随机推荐
Overview of video self supervised learning
Common time complexity
Oracle日期格式转换 to_date,to_char,to_timetamp 相互转换
About Estimation with Cross-Validation
Word查找红色文字 Word查找颜色字体 Word查找突出格式文本
华律网牵手观测云,上线系统全链路可观测平台
ICML2022 | 长尾识别中分布外检测的部分和非对称对比学习
彻底理解为什么网络 I/O 会被阻塞?
【历史上的今天】7 月 5 日:Google 之母出生;同一天诞生的两位图灵奖先驱
Summary of six points of MySQL optimization
LeetCode 6111. 螺旋矩阵 IV
Is it safe for Apple mobile phone to speculate in stocks? Is it a fraud to get new debts?
2022全网最全的腾讯后台自动化测试与持续部署实践【万字长文】
Linear table - abstract data type
开户注册挖财安全吗?有没有风险的?靠谱吗?
EasyCVR电子地图中设备播放器loading样式的居中对齐优化
2022年5月腾讯云开发者社区视频月度榜单公布
Precautions for RTD temperature measurement of max31865 module
@Extension、@SPI注解原理
How to write good code defensive programming