Re: PL/SQL Stored Procedure Question

From: Bruce Douglas <bruce.douglas_at_bridge.bst.bls.com>
Date: 1996/01/19
Message-ID: <NEWTNews.822117837.13590.bruce_at_ga.bst.bls.com>#1/1


In Article<leangl.247.30FFE6E3_at_ohsu.edu>, <leangl_at_ohsu.edu> writes:  

> Have anyone encountered the following problem:
>
 

> SQL> create procedure shwemp (emp_id number) is
> 2 begin
> 3 select empno, ename from emp where empno = emp_id;
> 4 end;
> 5 /
>
> Warning: Procedure created with compilation errors.

Oracle stored procedures cannot directly display answer sets. A select inside a PL/SQL block must be either a CURSOR or a SELECT INTO <variable-list>. It works more like embedded SQL in a C program instead of raw SQL.



Bruce Douglas - BellSouth Telecommunications <bruce.douglas_at_bridge.bst.bls.com>
Received on Fri Jan 19 1996 - 00:00:00 CET

Original text of this message