【开源中国 APP 全新上线】“动弹” 回归、集成大模型对话、畅读技术报告”
我想单独查出要置顶的部分数据(这部分数据其实只有一条数据),然后合并查询不是置顶的数据(按照创建时间排序),发现使用下面的SQL排序不起作用,请问如何解决?
SQL如下:
select * from usermsg_info where msgType =5 and othersMsg='top'
union all
select * from usermsg_info where msgType =5 and othersMsg !='top' order by createTime desc
select * from(select... union all select ..) order by createTime desc
1楼正解