如何让SQL语句不执行默认排序,而是按照in语句的顺序返回结果
2024-09-08 10:41:42
Oracle:
select name from order where order_id in('','','','','','')order by instr('111,222,333,444,555,666',order_id);
Mysql:
select name from order where order_id in ('','','','','','') order by instr(',111,222,333,444,555,666,',CONCAT(',',order_id,','));
摘自:https://blog.csdn.net/u011884440/article/details/70510805
最新文章
- 罪恶装备 Xrd REVELATOR 3D进化出的非照片真实视觉
- iOS 细碎知识整理
- boost::xml——基本操作以及中文乱码解决方案
- 在SAE上同步djanogo的mysql数据库
- C++11 tuple
- tyvj1185营业额统计
- API经济产业
- 利用Delphi监视注册表的变化
- Emgu.CV(三)
- java并发包下的并发工具类
- ORACLE虚拟索引(Virtual Index)
- 循环table 示例
- 序列号多个input输入demo
- 关于输出螺旋矩阵的demo
- Four Node.js Gotchas that Operations Teams Should Know about
- 【日常训练】Help Victoria the Wise(Codeforces 99C)
- linux shell 完成批量压缩文件
- linux mongodb replica set集群安装
- /usr/local/nginx/sbin/nginx -s reload 失败原因pid 进程记录和当前不符
- WPF与Winform中的不同(1)