這個oracle的排序問題怎麼寫

2022-12-03 06:15:15 字數 876 閱讀 5980

1樓:

select * from your_tab where c=0 order by a , b

union all

select * from your_tab where c=1 order by a , b desc;

2樓:匿名使用者

select * from

(select * from

(select top 6 * from where c=0 order by a,b) t1

union

select * from

(select top 3 * from

) t0

order by t0.a

3樓:匿名使用者

select * from (select rownumber() over(partition by a order by b desc where c=1) from table)

4樓:匿名使用者

根據c的值分別排序,然後再union all;

5樓:匿名使用者

select * from table where c=0 order by a,b

union all

select * from table where c=1 order by a,b desc

這樣就可以了.

6樓:石亮東

select a,b,c from tablename order by a,decode(c,'0',b,-b)

excel的排序問題,EXCEL排序問題

excel資料的排序 建議 先做分列,點 資料 分列 按分割符號分 其他 完成後,2 3 4等資料就在一列了,游標在這一列,點排序按鈕,就ok了。假設資料在a1 a10,在b1輸入公式 mid a1,3,find a1,3 3 向下填充,再將兩列以b列按升序排序,最後刪除b列即可。jxbglwj的方...

關於oracle的索引的問題

對於你這個問題,不是簡單就能說明白為什麼不變的。首先你的建立合適的索引,索引不只是b tree一種。索引分類 1.b tree 2.唯一索引 unique 3.複合 4.函式 5.點陣圖 6.反鍵 7.本地和全域性 1 表的主鍵 外來鍵必須有索引 2 資料量超過300的表應該有索引 3 經常與其他表...

delphi的dbgrid排序問題

建議使用adoconnection,adoquery,dbgrid的方式,你說的這種方式沒用過 何必自己寫 你可以用ehlib啊 裡面的dbgrideh又很多很好的功能 asp.net的連線資料庫然後顯示是麼?delphi高手進,如何改變dbgrid列的標題 雙擊dbgride新增列.然後寫上cap...