select * from (select 'Nick' as item from dual union all select 'Viki' as item from dual union all select 'Glen' as item from dual union all select 'Robin' as item from dual union all select 'Total' as item from dual) pre_tab order by decode(item, 'Viki', 1, 'Glen', 2, 'Robin', 3, 'Nick', 4);
本文提供了一个SQL查询示例,展示了如何使用UNION ALL合并多个相同结构的查询结果,并通过DECODE函数进行排序。
2556

被折叠的 条评论
为什么被折叠?



