I have encountered a very strange situation. I have a procedure that checks if a table name exists, if it does, it drops and re-create the table, else just create it. Following is the code : SELECT COUNT(*)
WHERE TABLE_NAME = 'X';
IF (V_TABLE_EXIST = 1) THEN
EXECUTE IMMEDIATE 'DROP TABLE X';
ELSIF (V_TABLE_EXIST = 0) THEN
'CREATE TABLE X
Strange thing is that this all works fine, untill I try and insert data into this new table, then I get a message that the table does not exists, and only when the table gets created and it did not exist before, else the insert works fine.