[quote=引用 8 楼 zhaoxiangchong 的回复:] 在where条件后面用order by 语句,有什么不妥吗?
在where条件后面用order by 语句,有什么不妥吗?
[quote=引用 2 楼 u011820742 的回复:] 这么做 序号可以改变顺序 对应的记录能否改变?
Select A from 表B where 序号 in(1,2,6,4,5) order by decode(序号,1,1,2,2,6,3,4,4,5,5)
Select A from 表B where 序号 in(1,2,6,4,5) 显示出来的列表如何根据 1,2,6,4,5 序号 排序 显示出来
Select A,case when 序号=1 then 1 when 序号=2 then 2 when 序号=6 then 3 when 序号=4 then 4 when 序号=5 then 5 else 999 end as px from 表B where 序号 in(1,2,6,4,5) order by px
这么做 序号可以改变顺序 对应的记录能否改变?
17,377
社区成员
95,128
社区内容
加载中
试试用AI创作助手写篇文章吧