Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: PL-SQL: Cursor definition with additional parameter ? reason/meaning ?
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