EXECUTE IMMEDIATE within Procedure doesn't work!!
768993Apr 25 2010 — edited Apr 26 2010Hi,
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