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

Home -> Community -> Usenet -> c.d.o.misc -> Re: Stored Procedure example

Re: Stored Procedure example

From: Frenchy461 <frenchy461_at_aol.com>
Date: 7 Oct 1998 20:29:25 GMT
Message-ID: <19981007162925.13634.00007215@ng-fc2.aol.com>

create procedure sp_select_emp(empid number) as

    cursor get_emp is

        select *
        from emp
        where emp_no = :empid;

    lr_emp        get_emp%rowtype;

begin

    open get_emp;
    fetch get_emp into lr_emp;

    close get_emp;

end;
/

This is an explicit cursor which is better for performance. An implicit cursor(which resembles the SYBASE look, need to fire twice to make sure that a second record doesn't exist. Received on Wed Oct 07 1998 - 15:29:25 CDT

Original text of this message

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