nanaxcentury.blogg.se

Cursors in plsql
Cursors in plsql







cursors in plsql

Its return value is TRUE if DML statements like INSERT, DELETE and UPDATE affect no row, or a SELECT INTO statement return no rows. Its return value is TRUE if DML statements like INSERT, DELETE and UPDATE affect at least one row or more rows or a SELECT INTO statement returned one or more rows. The following table soecifies the status of the cursor with each of its attribute. It will return an error if there no data is selected. If you run a SELECT INTO statement in PL/SQL block, the implicit cursor attribute can be used to find out whether any row has been returned by the SELECT statement. Some of them are: %FOUND, %NOTFOUND, %ROWCOUNT and %ISOPEN.įor example: When you execute the SQL statements like INSERT, UPDATE, DELETE then the cursor attributes tell whether any rows are affected and how many have been affected. Orcale provides some attributes known as Implicit cursor's attributes to check the status of DML operations.

cursors in plsql

These are created by default to process the statements when DML statements like INSERT, UPDATE, DELETE etc. The implicit cursors are automatically generated by Oracle while an SQL statement is executed, if you don't use an explicit cursor for the statement. A cursor contains information on a select statement and the rows of data accessed by it.Ī cursor is used to referred to a program to fetch and process the rows returned by the SQL statement, one at a time. In PL/SQL, the context area is controlled by Cursor. It contains all information needed for processing the statement. A cursor is a pointer to this context area. When an SQL statement is processed, Oracle creates a memory area known as context area.









Cursors in plsql