订单列表订单列表中有没有设置服务时间的,有已经设置过服务时间的,现在需要查询订单,按订单的服务时间升序排列,但是要把没有设置服务时间(默认为1970年)放到最后面,用一个sql语句怎么解决呢?
拥有18年软件开发和IT教学经验。曾任多家上市公司技术总监、架构师、项目经理、高级软件工程师等职务。 网络人气名人讲师,...
リーリー
Union を使用してクエリ結果をマージします。 (select * from a where service_time = !null order by service_time asc) union (select * from a where service_time = null);
事後条件は、特定の service_time のデフォルト値に応じて変更できます。
リーリー
Union を使用してクエリ結果をマージします。
(select * from a where service_time = !null order by service_time asc)
union
(select * from a where service_time = null);
事後条件は、特定の service_time のデフォルト値に応じて変更できます。