【发布时间】:2012-12-15 18:11:28
【问题描述】:
我有一个包含 3 列的表格:
id | name | priority
--------------------
1 | core | 10
2 | core | 9
3 | other | 8
4 | board | 7
5 | board | 6
6 | core | 4
我想使用priority 对结果集进行排序,但首先是那些具有name=core 的行,即使优先级较低。结果应该是这样的
id | name | priority
--------------------
6 | core | 4
2 | core | 9
1 | core | 10
5 | board | 6
4 | board | 7
3 | other | 8
【问题讨论】:
标签: mysql sql select sql-order-by