Part 13
Part 13
TYPE RECORD, on the other hand, is used when a query returns column of different tables
or views.
e_rec c1 %ROWTYPE
Cursor is a named private area in SQL from which information can be accessed. They are
required to process each row individually for queries which return multiple rows.
Cursor declares %ROWTYPE as loop index implicitly. It then opens a cursor, gets rows of
values from the active set in fields of the record and shuts when all records are processed.
totalsal=totalsal+smp_recsal;
ENDLOOP;