-
The first and last record in a cursor for loop
I am using the following approach to tell if a record is the first record in the cursor for loop. Is there a better way to do this? Also, is there a way to see if the record is the last record?
for rec in (select tmp.*, rownum
from (select COLUMN_NAME
from user_tab_columns where table_name=upper('&1') ) tmp)
loop
if rec.rownum = 1 then
----------------
else
----------------
end if;
end loop;
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|