问题我编写了一篇博客,希望各位网友能得到回复
https://blog.csdn.net/huangbaokang/article/details/106236453
问题我编写了一篇博客,希望各位网友能得到回复
https://blog.csdn.net/huangbaokang/article/details/106236453
查了一些资料, 应该是union all的问题, 合并后数据就是可能顺序会变。
方法么 , 看到启发,想到了2个:
1、 最终显示的地方分两次语句执行,然后输出
2、select \*, (用 if 等 把日期换算成 全局可以排序的) as _sort from task_view where xxxx order by status, _sort
比如状态 2的时候把 日期 换成整数 取个负,