当前位置:网站首页>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报错信息如下

我这么写有什么问题吗,或者其他方法如何实现
边栏推荐
- IJCAI2022 | DictBert:采用对比学习的字典描述知识增强的预训练语言模型
- 程序员失眠时的数羊列表 | 每日趣闻
- day14--postman interface test
- Understand the recommendation system in one article: Recall 06: Two-tower model - model structure, training method, the recall model is a late fusion feature, and the sorting model is an early fusion
- source program in assembly language
- [Machine Learning] 21-day Challenge Study Notes (2)
- [Word] #() error occurs after Word formula is exported to PDF
- 第十四天&postman
- [How to smash wool according to the music the couple listens to during the Qixi Festival] Does the background music affect the couple's choice of wine?
- 领域驱动设计——MDD
猜你喜欢

MySQL3

Gartner Hype Cycle:超融合技术将在2年内到达“生产力成熟期”

张驰咨询:揭晓六西格玛管理(6 Sigma)长盛不衰的秘密

《.NET物联网从零开始》系列

Exploding the circle of friends, Alibaba produced billion-level concurrent design quick notes are too fragrant

Live playback including PPT download | Build Online Deep Learning based on Flink & DeepRec

记录谷歌gn编译时碰到的一个错误“I could not find a “.gn“ file ...”

Utilities 
Creative code confession

一文看懂推荐系统:召回06:双塔模型——模型结构、训练方法,召回模型是后期融合特征,排序模型是前期融合特征
随机推荐
Greenplum数据库故障分析——能对数据库base文件夹进行软连接嘛?
Exercise: Selecting a Structure (1)
Gartner Hype Cycle:超融合技术将在2年内到达“生产力成熟期”
Programmer's list of sheep counting when insomnia | Daily anecdote
行业现状?互联网公司为什么宁愿花20k招人,也不愿涨薪留住老员工~
优化Feed流遭遇拦路虎,是谁帮百度打破了“内存墙”?
领域驱动设计——MDD
树形查找(二叉查找树)
[parameters of PyQT5 binding functions]
std::string::find 返回值的坑
【翻译】CNCF对OpenTracing项目的存档
缺陷检测(图像处理部分)
MySQL学习
oracle将restful接口封装到视图中
A new technical director, who calls DDD a senior, is convinced
如何模拟后台API调用场景,很细!
开篇-开启全新的.NET现代应用开发体验
安装oracle11的时候为什么会报这个问题
KingbaseES V8 GIS数据迁移方案(2. Kingbase GIS能力介绍)
2022杭电多校第一场