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: Andy Hardy <junkmail_at_[127.0.0.1>
Date: Fri, 23 Feb 2007 18:07:46 +0000
Message-ID: <45df2d72$0$8724$ed2619ec@ptn-nntp-reader02.plus.net>


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

Original text of this message

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