Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: Change SCHEMA in Stored Procedure
If your version is at least 8i, just use native dynamic SQL:
CREATE OR REPLACE PROCEDURE test (schema_name IN VARCHAR) AS
/** Define variables **/ CURSOR a IS SELECT * FROM A; BEGIN
.
.
execute immediate 'ALTER SESSION SET current_schema = schema_name'; . .
![]() |
![]() |