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: How to write a SELECT stored procedure ?

Re: How to write a SELECT stored procedure ?

From: <tjmxyz_at_my-deja.com>
Date: Tue, 03 Aug 1999 09:23:40 GMT
Message-ID: <7o6cen$5i2$1@nnrp1.deja.com>

> Use cursor.
> create or replace procedure GetNames()
> begin
> open mycursor for
> select name from tbemployee;
> end ;

That will do nothing....
Plus it wouldn't compile.

I think what you want is.
To execute the stored procedure and retireve the rows on the client side.

Just use:
select name from tbemployee

there is no advantage to having it as a stored procedure that I can think of.

The probelm is proecdure won't return the results into a cursor or record set.

I think you can do it with DBMS_OUTPUT. But I've never even bothered to try.

Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't. Received on Tue Aug 03 1999 - 04:23:40 CDT

Original text of this message

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