Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Returning multiple values with SELECT FOR LOOP

tx103108Dec 4 2012 — edited Dec 4 2012
Oracle EE 11gR1
PL/SQL
OEL 5.8
===========

Would like to know how to do the following?

for x, y in (select name, street
from employees
where hire_date < sysdate - 100)
loop
....

In other words, is there a way to handle 2 (or more) values in a SELECT FOR LOOP structure? If not, then how to accomplish the same task.
The above does not work of course. :-)
Appreciate any and all advice.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jan 1 2013
Added on Dec 4 2012
2 comments
888 views