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 create stored procedure in SQLplus?

Re: How to create stored procedure in SQLplus?

From: Karsten Farrell <kfarrell_at_belgariad.com>
Date: Thu, 01 May 2003 15:34:58 GMT
Message-ID: <MPG.191ade7c2e8f04cb989764@news.la.sbcglobal.net>


fake_at_fake.com said...
> assume i have a table abc
>
> create or replace procedure showabc is
> begin
> select * from abc;
> end;
> /
>
> what is the problem ?
>
> thanks again
>

PL/SQL does not automatically display the output of a SELECT statement (you need dbms_output.put_line or similar for that). So you need to put your output into a variable or ref cursor ... which means you need to limit it to one row returned (if in a variable) or place a output ref cursor in the procedure args.

-- 
/Karsten
DBA > retired > DBA
Received on Thu May 01 2003 - 10:34:58 CDT

Original text of this message

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