Start Updating multiple rows without cursor

Updating multiple rows without cursor

The cursor FOR loop is a variation on the numeric FOR loop, which looks like this: The index is implicitly declared by Oracle Database as an integer and can be referenced only inside the body of this loop.

It also takes a look at record types, which enable you to work with records that are not necessarily related to a relational table.

PL/SQL makes it very easy to declare records that have the same structure as a table, a view, or the result set of a cursor by offering the %ROWTYPE attribute.

You can do this at the record level or by referencing individual fields of that record, with the same dot notation used in SQL to refer to the column of a table.

So if I declare a record as follows, Most of the time when you work with records, you will be assigning a row from a table to a record.

The Oracle PL/SQL language was designed to be a portable, high-performance transaction processing language that is tightly integrated with the SQL language.

It is rare, indeed, to find a PL/SQL program that does not either read from or make changes to tables in a database.

Suppose I want to write a program to display the last names of all employees.