Server Side Cursors !

Results 1 to 2 of 2

Thread: Server Side Cursors !

  1. #1
    Join Date
    Dec 1969

    Default Server Side Cursors !

    How can I create Server side cursors in Oracle and can I create updatable cursors ???<BR>regards

  2. #2
    Join Date
    Dec 1969

    Default RE: Server Side Cursors !

    Here is an example of using a cursor inside a procedure as part of a package body. You don&#039;t necessarily have to use a cursor in this way, you can create one in a normal stored prodecure or even a SQL*PLUS script.<BR><BR>*********************************** ********************<BR> PROCEDURE GetEmployeeList(<BR> o_emID OUT tblEMID,<BR> o_FirstName OUT tblFirstName,<BR> o_LastName OUT tblLastName)<BR> IS<BR> CURSOR employee_cur IS<BR> SELECT em_id, <BR> em_first_name, em_last_name<BR> FROM employee;<BR> <BR> recCount NUMBER DEFAULT 0;<BR> BEGIN<BR> FOR EmployeeRec IN employee_cur LOOP<BR> <BR> recCount:= recCount + 1;<BR> <BR> o_emID(recCount):= EmployeeRec.em_id;<BR> o_FirstName(recCount):= EmployeeRec.em_first_name;<BR> o_LastName(recCount):= EmployeeRec.em_last_name;<BR><BR> END LOOP;<BR><BR> END GetEmployeeList;<BR>****************************** ********************************<BR><BR>Hope that helps.<BR>Pete

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts