mysql order by with union doesn't seem to work

前端 未结 4 2088
一生所求
一生所求 2020-12-14 19:15

Here is my query

(SELECT * FROM `jokes` WHERE `flags` < 5 AND (`title` LIKE \"%only three doors%\" OR `joke` LIKE \"%only three doors%\") ORDER BY `ups`          


        
4条回答
  •  执念已碎
    2020-12-14 19:50

    You should be able to use UNION ALL to remove duplicate removal (and also complete result set sorting). Using that the result set should be in the order of the select statements in the query.

提交回复
热议问题