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;
o esta otra:plsql - obtener la primera fila - ¿cuál es mejor?
select x.id
from(select t.id
from table1 t
where t.foo=p_foo
order by t.creation_date) x
where rownum = 1
Tanto arriba, establecieron resultado similar pero necesito sabe acerca de cuál es más eficiente!
+1 para muy buen análisis con estática –