Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

EXECUTE IMMEDIATE within Procedure doesn't work!!

768993Apr 25 2010 — edited Apr 26 2010
Hi,

I have a code in which the procedure is successfully created, but when I try to check if the table TEST_TABLE is created (ex, DESC TEST_TABLE) it generates an error:

ORA-04043: object TEST_TABLE does not exist

Which means that my EXECUTE IMMEDIATE didn't work within the procedure for some reason, while it works perfectly alone without the procedure!!

Hope you help me with this..

Here's the my code:

CREATE OR REPLACE PROCEDURE TEST_IMM1

AS

BEGIN
EXECUTE IMMEDIATE ' CREATE TABLE TEST_TABLE (ITEM_DESC VARCHAR2(10))';
END;
/

--Procedure created.

DESC TEST_TABLE

ERROR:
ORA-04043: object TEST_TABLE does not exist
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on May 24 2010
Added on Apr 25 2010
6 comments
3,398 views