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

我这么写有什么问题吗,或者其他方法如何实现
边栏推荐
- 开篇-开启全新的.NET现代应用开发体验
- 如何基于OpenVINO POT工具简单实现对模型的量化压缩
- Greenplum数据库故障分析——能对数据库base文件夹进行软连接嘛?
- MySQL learning
- 习题:选择结构(一)
- LPQ (local phase quantization) study notes
- 亚马逊云科技携手中科创达为行业客户构建AIoT平台
- How do programmers without objects spend the Chinese Valentine's Day
- 记录谷歌gn编译时碰到的一个错误“I could not find a “.gn“ file ...”
- 数仓4.0(三)------数据仓库系统
猜你喜欢

source program in assembly language

优化Feed流遭遇拦路虎,是谁帮百度打破了“内存墙”?

释放技术创新引擎,英特尔携手生态合作伙伴推动智慧零售蓬勃发展

超越YOLO5-Face | YOLO-FaceV2正式开源Trick+学术点拉满

Are testing jobs so hard to find?I am 32 this year and I have been unemployed for 2 months. What should an older test engineer do next to support his family?

HOG feature study notes

MySQL学习

【MySQL series】- Does LIKE query start with % will make the index invalid?

习题:选择结构(一)

如何基于OpenVINO POT工具简单实现对模型的量化压缩
随机推荐
Transfer Learning - Joint Geometrical and Statistical Alignment for Visual Domain Adaptation
Utilities 测试工作这么难找吗?今年32,失业2个月,大龄测试工程师接下来该拿什么养家?
方法重写与Object类
Gartner Hype Cycle:超融合技术将在2年内到达“生产力成熟期”
[Redis] Redis installation under Linux
程序员失眠时的数羊列表 | 每日趣闻
[parameters of PyQT5 binding functions]
Why is this problem reported when installing oracle11
多线程涉及的其它知识(死锁(等待唤醒机制),内存可见性问题以及定时器)
汇编语言之源程序
【MySQL系列】- LIKE查询 以%开头一定会让索引失效吗
oracle将restful接口封装到视图中
居民用水问题
JZ搜索引擎solr研究-从数据库创建索引
Residential water problems
source program in assembly language
C language basics -- pointers
Creative code confession
进程在用户态和内核态的区别[独家解析]