Updating table using cursor in oracle
When you sign in to comment, IBM will provide your email, first name and last name to DISQUS.
In this chapter, we will discuss the cursors in PL/SQL. A cursor holds the rows (one or more) returned by a SQL statement.Even though the cursor stores multiple records, only one record can be processed at a time, which is called as current row.When you fetch a row the current row position moves to next row.If none of the employee’s salary are updated we get a message 'None of the salaries where updated'.
Else we get a message like for example, 'Salaries for 1000 employees are updated' if there are 1000 rows in ‘employee’ table.If this is something you need to do all the time, I would suggest something else, but for a one-off or very small tables it should be sufficient.