当前位置:网站首页>sql语句多字段多个值如何进行排序
sql语句多字段多个值如何进行排序
2022-08-05 01:56:00 【CSDN问答】
sql语句多字段多个值如何进行排序?需求是查询所有的列表,然后根据出发地和目的地进行排序,我是用case when 语法总是报错
sql语句如下
select swco.id,swco.order_type,swco.goods_type_id,swco.departure,swco.bounty,swco.goods_number,swco.goods_name,swco.destination,swco.goods_value,swco.goods_weight,swco.order_status,swco.end_time,swco.start_time from sys_we_chat_order swco where swco.deleted =0 order by case when departure ='北京' and destination ='衡水' then '北京' when departure ='北京' then '衡水' when destination ='衡水' then '衡水', swco.create_time desc
报错信息如下
我这么写有什么问题吗,或者其他方法如何实现
边栏推荐
猜你喜欢
ExcelPatternTool: Excel表格-数据库互导工具
【机器学习】21天挑战赛学习笔记(二)
【Word】Word公式导出PDF后出现井号括号#()错误
pytorch的使用:使用神经网络进行气温预测
VOC格式数据集转COCO格式数据集
迁移学习——Joint Geometrical and Statistical Alignment for Visual Domain Adaptation
IJCAI2022 | DictBert:采用对比学习的字典描述知识增强的预训练语言模型
方法重写与Object类
金仓数据库 KingbaseES V8 GIS数据迁移方案(3. 基于ArcGIS平台的数据迁移到KES)
Transfer Learning - Distant Domain Transfer Learning
随机推荐
1349. 参加考试的最大学生数 状态压缩
2022杭电多校第一场
The difference between a process in user mode and kernel mode [exclusive analysis]
HOG特征学习笔记
习题:选择结构(一)
安装oracle11的时候为什么会报这个问题
手把手基于YOLOv5定制实现FacePose之《YOLO结构解读、YOLO数据格式转换、YOLO过程修改》
PHP Skills Assessment
配置类总结
pytorch的使用:卷积神经网络模块
Exploding the circle of friends, Alibaba produced billion-level concurrent design quick notes are too fragrant
MySQL3
刷爆朋友圈,Alibaba出品亿级并发设计速成笔记太香了
Lattice PCIe Learning 1
蓝牙Mesh系统开发五 ble mesh设备增加与移除
[Word] #() error occurs after Word formula is exported to PDF
Use of pytorch: Convolutional Neural Network Module
C# const readonly static 关键字区别
[Endnote] Word inserts a custom form of Endnote document format
Oracle encapsulates restful interfaces into views