Welcome to WuJiGu Developer Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
284 views
in Technique[技术] by (71.8m points)

MySQL字段排序,数据混乱。

有这样一种情况。在一张数据表中,存在id,存在order_num。这两个字段都是int(10)类型。
现在需要根据order_num字段排序,一切都是正常的。但有一种情况,如果order_num的值是相同的,比如都是0,这时候数据顺序都是混乱的。于是加上一个id字段做额外的排序。操作如下图:
image
image
两者查询的结果却不相同,有人知道这个concat是怎么处理的吗?


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

concat 以后是按照字符串排序了 9最大 1最小


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to WuJiGu Developer Q&A Community for programmer and developer-Open, Learning and Share
...