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;
czy to jedno:plsql - otrzymasz pierwszy wiersz - który z nich jest lepszy?
select x.id
from(select t.id
from table1 t
where t.foo=p_foo
order by t.creation_date) x
where rownum = 1
Zarówno powyżej zrobić podobny wynik, ale muszę wiedzieć o który z nich jest bardziej wydajny!
+1 za bardzo dobrą analizę ze statystyką –