Order by day_of_week in MySQL

后端 未结 10 2149
一向
一向 2020-12-14 04:15

How can I order the mysql result by varchar column that contains day of week name?

Note that MONDAY should goes first, not SUNDAY.

10条回答
  •  旧巷少年郎
    2020-12-14 05:01

    Found another way, your can reverse order bye week

    ORDER BY date_format(date_name, '%w') DESC;
    

提交回复
热议问题