Cursor in PL/SQL
You are currently browsing the articles from Techno Oracle matching the category Cursor in PL/SQL.
Commercial applications require that the query, which, defines the cursor, be generic and the data that is retrieved from the table be allowed to change according to need. Oracle recognizes this and permits the creation of a parameterized cursor prior opening. Parameters allow values to be passed to a cursor when it is opened, and [...]
Written by admin on June 26th, 2010 with 2 comments.
Read more articles on Cursor in PL/SQL.
The Cursor FOR Loop implicitly declares its loop index as a record of type %ROWTYPE, opens a cursor, repeatedly fetches rows of the values from the active set into fields in the record, then closes the cursor when all rows have been processed or when the EXIT command is encountered. The syntax for the FOR [...]
Written by admin on June 26th, 2010 with no comments.
Read more articles on Cursor in PL/SQL.
We will move to some examples showing how to Use Cursor in Oracle PL/SQL Example 1:Consider a PL/SQL code to display the employee number, employee name, job of employees of Department ‘Database Security’ DECLARE CURSOR C1 IS SELECT EMP_NO, EMP_NAME, EMP_JOB FROM EMP WHERE EMP_DEPT=’DataBase Security’; /*EMP_REC is a row type variable for cursor c1 [...]
Written by admin on June 25th, 2010 with no comments.
Read more articles on Cursor in PL/SQL.