Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Newbie question
George wrote:
> I am coming from a SQL Server background so be gentle...
>
> I am trying to get this simple procedure worked out and it compiles invalid.
> What am I doing wrong
>
> BEGIN
> SELECT SSN FROM STUDENT;
> END;
You must SELECT into something.
PL/SQL is a server language not a client language.
So you SELECT statement slelects the value into nothingness.
Try this:
DECLARE x student.ssn%TYPE;
BEGIN
SELECT ssn
INTO x
FROM student;
END;
/
Daniel Morgan Received on Fri Jan 03 2003 - 10:27:54 CST
![]() |
![]() |