4.8.5 Using %ROWTYPE With Cursors
Using the %ROWTYPE attribute, a record can be defined that contains fields corresponding to all columns fetched from a cursor or cursor variable. Each field takes on the data type of its corresponding column. The %ROWTYPE attribute is prefixed by a cursor name or cursor variable name.record cursor%ROWTYPE;record is an identifier assigned to the record. cursor is an explicitly declared cursor within the current scope.The following example shows how you can use a cursor with %ROWTYPE to get information about which employee works in which department.