Oracle 按指定順序排序


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);

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM