Re: cursor

From: Frank van Bortel <frank.van.bortel_at_gmail.com>
Date: Fri, 02 Feb 2007 19:16:25 +0100
Message-ID: <epvv4v$4vl$1_at_news6.zwoll1.ov.home.nl>


oracle schreef:
> Hi,
>
> vat is cursor? vat is exact use of cursor?
>
> bye
> prasad
>
All right, all right - we go it the first time!

A cursor is some pointer to a memory location.

You define a cursor for a select statement, you open the cursor, and fetch the first row of data returned by the select statement.
You process that, and fetch the next row of data, or close the cursor - depending on your needs.

Back to the pointer business:
- open cursor: prepare statement,
  set pointer to top of the result stack. - fetch: fetch a (number of) record(s), return   the one pointed at, modify pointer to point to   the next record.

I am not sure what you mean by exact use of cursor; the general idea is to avoid explicit cursors.

-- 
Regards,
Frank van Bortel

Top-posting is one way to shut me up...
Received on Fri Feb 02 2007 - 19:16:25 CET

Original text of this message