Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> PL/SQL Questions
Hi,
I'm using WinNt Oracle8.
2. Just to check whether my way of coding PL/SQL statements is correct?
create or replace package P1 as
cursor cnC1 is select c1 from tab1; type cnC1cur is ref cursor return c1%ROWTYPE; function getC1 return cnC1cur;
create or replace package body P1 as
function getC1 return cnC1cur as l_cursor types.cursorType; begin open l_cursor is select c1 from tab1; return l_cursor; end;
My question is whether it is efficient or needed to define the cursor twice, once in the package header and another time in the function itself.
Also is using function this way better or using a procedure with IN OUT settings
TIA,
Aik Khoon
Received on Mon Aug 02 1999 - 15:07:34 CDT
![]() |
![]() |