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!

How to iterate over all attributes of %rowtype variable

405435Dec 11 2003 — edited Dec 14 2003
I have the following code:

declare
cursor c is select * from table;
r c%rowtype;
begin
for r in c loop
process(r.attr1);
process(r.attr2);
process(r.attr3);
process(r.attr4);
process(r.attr5);
-- ...
end loop;
end;

Since the members of r may change (or there may be lot of them), I would need to iterate over them. Is this possible?
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jan 11 2004
Added on Dec 11 2003
10 comments
6,886 views