For example, there is a statement that
select uid from user where uid = 70 or uid =68 or uid = 69;
MySQL is returning the
68
69
70
How to get MySQL back
70
68
69
The result of this is that the conditions of where are then returned first.
Reply content:
For example, there is a statement that
select uid from user where uid = 70 or uid =68 or uid = 69;
MySQL is returning the
68
69
70
How to get MySQL back
70
68
69
The result of this is that the conditions of where are then returned first.
SELECT id, nameFROM mytableWHERE name IN ('B', 'A', 'D', 'E', 'C')ORDER BY FIELD(name, 'B', 'A', 'D', 'E', 'C')
You can find it on the Internet.
select uid from user where uid in( 70 ,68 , 69) order by fine_in_set('uid','70,68,69');
select uid from user where uid = 70 or uid =68 or uid = 69 order by uid desc
Select UID from user where uid = or uid =68 or UID = the order by uid Desc;