inside a LOOP you need to FETCH from the REF CURSOR to a RECORD (with matching field declarations). Then from the RECORD you could access the field values. Terminate the LOOP via EXIT command (syntax: EXIT WHEN [condition])
- RECORD must match the REF CURSOR's order/number of attributes
- in case the REF CURSOR is opened to a [SELECT *] on a table, use the table's %ROWTYPE (e.g. syntax PAYMENTS%ROWTYPE)
No comments:
Post a Comment