Results 1 to 4 of 4

Thread: Oracle Cursors

  1. #1
    Geek_Guest
    Guest

    Oracle Cursors

    How the cursor is used in the plsql block...... is it possible to do the same thing through queries in the block ( that what cursor do ) ..if it is so.., what is purpose of the cursor ???


  2. #2
    Moderator
    Join Date
    Jun 2007
    Answers
    2,074

    Re: Oracle Cursors

    Hope this helps u regarding cursors in oracle pl/sql

    CURSOR LIFE CYCLE
    ----------
    declare-->open-->fetch-->check last record-->close

    basic syntax of cursor
    ------------------------------
    declare cursor cursorname [(param1,param2,....)] is select statment [for update [of col1,col2,..];
    begin
    open cursorname[(input arguments)];
    loop
    fetch cursorname into v1,v2,.....;
    end loop;
    close cursorname;
    end;

    Last edited by debasisdas; 06-25-2007 at 02:42 AM.

  3. #3
    Junior Member
    Join Date
    Apr 2007
    Answers
    11

    Re: Oracle Cursors

    hi
    i think debasis had given the first question answer

    for the second one
    no its not possible to queries more than one row in pl/sql.
    you have to name to work area for this work thru cursor


  4. #4

    Re: Oracle Cursors

    If u want to do manipulations to more than one row its compulsory to use cursors. without cursors we can't perform manipulations for more than one row.If u don't want to use a cursor then u have to write a query for each and every manipulation


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
About us
Applying for a job can be a stressful and frustrating experience, especially for someone who has never done it before. Considering that you are competing for the position with a at least a dozen other applicants, it is imperative that you thoroughly prepare for the job interview, in order to stand a good chance of getting hired. That's where GeekInterview can help.
Interact