当前位置:网站首页>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 :
边栏推荐
- Chinese postman? Really powerful!
- The main thread anr exception is caused by too many binder development threads
- 关于服装ERP,你想知道的都在这里了
- [HCIA cloud] [1] definition of cloud computing, what is cloud computing, architecture and technical description of cloud computing, Huawei cloud computing products, and description of Huawei memory DD
- Simple query cost estimation
- EasyCVR授权到期页面无法登录,该如何解决?
- How to write good code defensive programming
- MySQL优化六个点的总结
- Exemple Quelle est la relation entre le taux d'échantillonnage, l'échantillon et la durée?
- 在通达信上做基金定投安全吗?
猜你喜欢
【HCIA-cloud】【1】云计算的定义、什么是云计算、云计算的架构与技术说明、华为云计算产品、华为内存DDR配置工具说明
如何快速进阶自动化测试?听听这3位BAT大厂测试工程师的切身感想....
企业数字化转型之路,从这里开始
[detailed explanation of AUTOSAR 14 startup process]
Summary of six points of MySQL optimization
自动化测试的好处
Powerful tool for collection processing
一朵云开启智慧交通新未来
2022最新中高级Android面试题目,【原理+实战+视频+源码】
Chinese postman? Really powerful!
随机推荐
Is it safe to open an account, register and dig money? Is there any risk? Is it reliable?
MYSQL中 find_in_set() 函数用法详解
【Autosar 十四 启动流程详解】
rust统计文件中单词出现的次数
LeetCode 6109. 知道秘密的人数
AI Open2022|基于异质信息网络的推荐系统综述:概念,方法,应用与资源
Is it safe for golden sun to open an account? Can I open an account free of 5 in case?
一文读懂简单查询代价估算
Cronab log: how to record the output of my cron script
Is it complicated to open an account? Is online account opening safe?
Oracle 中文排序 Oracle 中文字段排序
ICML2022 | 长尾识别中分布外检测的部分和非对称对比学习
XML基础知识概念
Find in MySQL_ in_ Detailed explanation of set() function usage
RedHat7.4配置yum软件仓库(RHEL7.4)
@Extension, @spi annotation principle
How to write good code defensive programming
Shang Silicon Valley Shang preferred project tutorial release
Quickly generate IPA package
Reading notes of Clickhouse principle analysis and Application Practice (5)