mysql custom sort order statement
- 2020-06-07 05:26:09
- OfStack
mysql custom sort order
For example, the sort order can be defined by adding ORDER BY FIELD(status,3,4,0,2,1) to the sql statement
Note: status is a sort field followed by the associated value of the field
For example, the sort order can be defined by adding ORDER BY FIELD(status,3,4,0,2,1) to the sql statement
Note: status is a sort field followed by the associated value of the field