For example, there is a statement selectuidfromuserwhereuid70oruid68oruid69, and mysql returns the 686970 result so that mysql returns the 706869 result based on the where condition. For example, there is a statement
select uid from user where uid = 70 or uid =68 or uid = 69;
Mysql returns
68
69
70
How to Make mysql return
70
68
69
The result is returned according to the where condition.
Reply content: for example, there is such a statement
select uid from user where uid = 70 or uid =68 or uid = 69;
Mysql returns
68
69
70
How to Make mysql return
70
68
69
The result is returned according to the where condition.
SELECT id, nameFROM mytableWHERE name IN ('B', 'A', 'D', 'E', 'C')ORDER BY FIELD(name, 'B', 'A', 'D', 'E', 'C')
You can find it online.
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 = 70 or uid = 68 or uid = 69 order by uid desc;