oracle - SQL Join with Table Alias in PLSQL Cursor -
i playing around , trying make work , can't find way around. join in sql statement table alias'.
how access these items in plsql loop?
select it.item_title title, r.item_id id item it, rental_item r it.item_id = r.item_id;
i know if there way access them in loop given query above cursor or in (query)
...
for in c loop dbms_output.print_line(i.title||' '||i.id); end loop;
right using static cursor , filling table of records data , manipulating it. however, if problem can solved in fashion more elegant.
thanks in advance.
here how it, don't see reason why wouldn't work.
declare cursor c1 select it.item_title title, r.item_id id item inner join, rental_item r on it.item_id = r.item_id; begin rec in c1 loop dbms_output.print_line(rec.title||' '||rec.id); end loop; end;
Comments
Post a Comment