0
在選擇多行之後,我需要面對的問題,以遍歷每行,並獲取那些與第一行有一些相關信息的人。將第一行與其他行進行比較
例子:
select NAME,ENGLISH_GRADE,FRANCE_GRAE
from (some complex query that have order by and returns 100 rows) WHOLE_ROWS
where
//Here I need to loop over WHOLE_ROWS and make something like that:
//if(currentRow.ENGLISH_GRADE==WHOLE_ROWS(0).ENGLISH_GRADE)
//fetch this row
我相信你必須爲此使用匿名PL-SQL塊。你看過文檔嗎? – Satya
坦率地說,我只是需要它作爲一個沒有任何PL-SQL的純SQL。 – Echo