本帖最后由 xuz0917 于 2013-04-14 15:29:26 编辑

解决方案 »

  1.   


    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
      

  2.   


    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 
      

  3.   

    试试这个,测试可以
    SELECT *
    FROM test
    WHERE city LIKE '%北京%'
    ORDER BY (
    top LIKE '%北京%'
    ) DESC , id DESC