Oracle table cast collection updating type using table cast
An elegant and simple way to do this in PL/SQL is to take advantage of the cursor FOR loop (which I discussed in part 2 of this PL/SQL 101 series).
You can also, however, assign values directly to individual fields or even to the record as a whole by using the PL/SQL assignment operator (:=).
Rather than work with long lists of variables or parameters, you can work with a record that all that information.
User-defined records offer the flexibility to construct your own composite datatype, reflecting program-specific requirements that may not be represented by a relational table.
In the next article in this PL/SQL 101 series, I will explore another key composite datatype, the collection.
Collections, PL/SQL’s implementation of arraylike structures, are used in some of the most important performance-related PL/SQL features, including FORALL and BULK COLLECT.
records because they are similar in structure to a record defined on a table with %ROWTYPE but are restricted in their usage.