Updating using explicit cursors microsoft windows updating

6854933580_2c8b688306_z

Zero rows returning implicit cursor raises NO_DATA_FOUND exception, while multiple rows one raises TOO_MANY_ROWS exception.

Check the exception situations in the below screen dumps.

Instead of using a simple lifetime average, Udemy calculates a course's star rating by considering a number of different factors such as the number of ratings, the age of ratings, and the likelihood of fraudulent ratings.

Since, it returns a single row output, it demonstrates the construction of single row implicit cursor.[box]DECLAREL_SAL NUMBER; BEGINSELECT SALARYINTO L_SALFROM EMPLOYEESWHERE EMPLOYEE_ID=110; END;[/box]Example Code [3]: In the PL/SQL block below, UPDATE statement recalculates the salary of all employees in the company.Cursor follows a defined execution cycle to execute the SQL statement associated with it.The article describes the Oracle cursors and their usage.Having being the query returning multiple rowed result set, it would end up raising an exception and hence, abnormal termination.The above coding practice carries its own pros and cons.If the SELECT query is expected and framed to written a single row, SELECT with INTO clause is performance efficient.

You must have an account to comment. Please register or login here!