简单排序的问题,帮我看下什么原因。
1,数据:ub_articles
ArtFullCode
--------------------
22-1-10-10
22-1-10-09
2-2-11-01
2,SQL:
select ArtFullCode from ub_articles
ORDER by ArtFullCode
3,结果:
ArtFullCode
--------------------
22-1-10-09
2-2-11-01
22-1-10-10
4,为什么结果不是:
ArtFullCode
--------------------
22-1-10-09
22-1-10-10
2-2-11-01
或
ArtFullCode
--------------------
2-2-11-01
22-1-10-09
22-1-10-10
[解决办法]
哦
好奇怪
[解决办法]
确实奇怪,不能理解
[解决办法]
果然是这样, 奇怪.
[解决办法]
好奇怪。
[解决办法]
感觉跟排序规则有关.
select ArtFullCode from ub_articles order by ArtFullCode COLLATE Chinese_PRC_BIN
结果就成了
ArtFullCode
--------------------------------------------------
2-2-11-01
22-1-10-09
22-1-10-10
(3 行受影响)