Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: [ask]: what wrong with my store procedure
earthlink wrote:
> hi, everyone,
> i'm new in Oracle programming.
> i just create some stored procedures.
> some procedures work, some don't.
> can you help me why this storee procedure won't work?
>
> p.s. I got compilation error from oracle.
> TIA
>
> Phil
>
> create or replace procedure t1
> is
> begin
> select count(*)
> from t_customer
> where person = 'father';
> end;
> /
You must select into something. A select statement such as you have here is not valid in PL/SQL.
create or replace procedure t1
is
tmp number;
begin
select count(*)
into tmp from t_customer where person = 'father';
is the syntax you need.
Geoff Received on Wed Mar 17 1999 - 20:12:45 CST
![]() |
![]() |