Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: PL-SQL: Cursor definition with additional parameter ? reason/meaning ?

Re: PL-SQL: Cursor definition with additional parameter ? reason/meaning ?

From: Mark D Powell <Mark.Powell_at_eds.com>
Date: 26 Feb 2007 07:30:39 -0800
Message-ID: <1172503838.978815.158510@t69g2000cwt.googlegroups.com>


On Feb 22, 4:12 pm, Wern..._at_mail.org (Werner Mueller) wrote:
> I learned that a cursor definition in PL-SQL follows the schema:
>
> Curosr mycurosr is ...
>
> Now I found a couple of sample where the cursor definition is like
>
> Cursor mycursor (somevar VARCHAR2) is ....
>
> What does that parameter/variable defintion mean ?
> Sometimes even more 2 or 3 additional vars are defiend
>
> How can I use this variable.
> May I get an example on how to apply such a parameter.
>
> Werner

I could sware that I answered this back when it was posted.

You can find the answer in the PL/SQL manual. Basically when the cursor is opened it will be opened using the bind variable value in the where clause of the query. That is, the parameter is a bind variable. Each time the cursor is executed it will be executed using the current value of the variable.

HTH -- Mark D Powell -- Received on Mon Feb 26 2007 - 09:30:39 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US