I am playing around and am trying to make something like this work and can't find a way around. I do a join in a sql statement with table alias'.
How do I then access these items in a PLSQL for loop?
SELECT
it.item_title title,
r.item_id id
FROM
item it, rental_item r
WHERE
it.item_id = r.item_id;
I would like to know if there is a way to access them in a loop like this given that the query above is a cursor or for i in (query)
...
FOR i IN c LOOP
dbms_output.print_line(i.title||' '||i.id);
END LOOP;
Right now I am using a static cursor and filling a table of records with the data and then manipulating it. However, if this problem can be solved in this fashion it would be much more elegant.
Thanks in advance.