MySQL order null 零

MySQL order null 0

1、一般的order by 语句其返回的结果为

SELECT `vcenter_ip`, `status`, `sla_id` FROM vm_list ORDER BY sla_id ASC;

MySQL order null 零

2、这个很显然不是我想要的结果,修改SQL如下[红色为关键语句]

SELECT `vcenter_ip`, `status`, `sla_id` FROM vm_list ORDER BY sla_id is NULL, sla_id = 0, sla_id ASC;

MySQL order null 零