Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Stored Procedure example
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