This section examines the performance of a stored procedure written two different ways:
Without a cursor – this procedure scans the table three times, changing the price of each book.
With a cursor – this procedure makes only one pass through the table.
In both examples, there is a unique index on titles(title_id).