I created the global temp table. when I execute the code as an individual scripts it works fine. but when I execute it as a single script in TOAD then no record was created. there was just an empty global temp table.
eg.
CREATE GLOBAL TEMPORARY TABLE TEMP_TRAN
(
COL1 NUMBER(9),
COL2 VARCHAR2(30),
COL3 DATE
) ON COMMIT PRESERVE ROWS
/
INSERT INTO TEMP_TRAN VALUES(1,'D',sysdate);
/
INSERT INTO TEMP_TRAN VALUES(2,'I',sysdate);
/
INSERT INTO TEMP_TRAN VALUES(3,'s',sysdate);
/
COMMIT;
When I run the above code one statement at a time it works fine. But when I execute it as a script it runs fine but there was no records in temp table.
can anyone help me on this please?