Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.tools -> Return result set from stored procedure, possible ?
Hello
This is propably a FAQ, but since I couldn't find it there, I ask here.
Is it possible to let stored procedures return a result set? I have used sybase earlier, and it works there...
something like:
CREATE PROCEDURE SEL_ALL AS
BEGIN
SELECT COL_A, COL_B, COL_C FROM TABLE_A;
END;
/
so that when you call it, it would be just like running the SELECT directly.
When I tried, I got compilation errors, and Oracle wanted me to select INTO some variable...
The purpose is to avoid embedding SELECT statements in external programs, and keep the SELECTs inside Oracle, so they can be easily changed...
What do you suggest ?
Regards
-- Gunnar Bjørgum gunnar.bjorgum_at_telenor.com NorwayReceived on Fri Oct 20 2000 - 09:34:48 CDT
![]() |
![]() |