时间:2021-07-01 10:21:17 帮助过:9人阅读
再加50分,就这些分了,请大哥大姐帮忙
不够100分了,请大哥大姐帮忙
不在线等了,想拿分的找我QQ515403255
select * from company where city like '%北京%' and top like '北京' order by id desc union select * from company where city like '%北京%' and top not like '北京' order by id desc
select * from company where city like '%北京%' and top like '北京' order by id desc union select * from company where city like '%北京%' and top not like '北京' order by id desc
这个好像不是我想要的
试试这个,测试可以
SELECT *FROM testWHERE city LIKE '%北京%'ORDER BY (top LIKE '%北京%') DESC , id DESC
表名没改,test改成company
试试这个,测试可以
SQL code
?
123456
SELECT * FROM test WHERE city LIKE '%北京%'ORDER BY ( top LIKE '%北京%') DESC , id DESC
正解