LV_id number;
Cursor CR_test Is
select t.id
from table1 t
where t.foo = p_foo
order by t.creation_date;
Open CR_test;
Fetch CR_test
Into LV_id;
Close CR_test;
か、この1:plsql - 最初の行を取得する - どちらが良いですか?
select x.id
from(select t.id
from table1 t
where t.foo=p_foo
order by t.creation_date) x
where rownum = 1
はどちらも上記同様の結果を作るが、私は1つが、より効率的であるかについて知られている必要があります!
+1非常に良い統計解析 –