Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: Dumb Q but I need to Know
you must select INTO something.
ie.
declare
name_var char(30);
begin
SELECT ename INTO name_var FROM employee WHERE empcode = 4567;
end;
/
This will only work for a select that returns 1 record, if you need a set of records, you will have to use a cursor.
HTH Michael Heindel, AAM
In article <IIFThen> Wrote,
> I'm trying to write a simple select query within an Oracle stored
procedure
> using the following syntax:
> select * from <tablename> where <condition statement>
> It's compiling with errors. How do I rectify this for Oracle SP. I
guess
> I've been with MS SQL Server SP way of doing things. Can anyone out
there
> help me out. Thank you.
> --
> IIFThen
Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.
Received on Thu Sep 23 1999 - 05:49:07 CDT
![]() |
![]() |