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 ?
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
It allows you to pass variables into the cursor query, e.g.
cursor my_cursor (p_name varchar2)
is
select name, address, telephone
from my_table
where name = p_name
;
Received on Fri Feb 23 2007 - 12:07:46 CST