Answers for "mysql order by query"

SQL
1

order by value mysql

SELECT * FROM mytable WHERE id IN (1,2,3,4) ORDER BY FIELD(id,3,2,1,4);

# or
SELECT * FROM mytable ORDER BY FIELD(field_name,'value1','vaue2','etc');
Posted by: Guest on October-05-2021
3

MySQL ORDER BY

SELECT 
   select_list
FROM 
   table_name
ORDER BY 
   column1 [ASC|DESC], 
   column2 [ASC|DESC],
   ...;
Posted by: Guest on October-19-2020
0

mysql order by list

ORDER BY FIELD(id, 3, 11, 7, 1)
Posted by: Guest on May-03-2021

Code answers related to "SQL"

Browse Popular Code Answers by Language