5 pts.
 Temporary Table in Oracle 10g
create global temporary table transaction_tab
    --on commit delete rows
    as SELECT * FROM CUSTOMERTELEPHONYSERVICE WHERE 0=1;
    commit;
    insert into transaction_tab SELECT * FROM CUSTOMERTELEPHONYSERVICE WHERE CUSTOMERTELEPHONYSERVICEID = 1;
    
    
    select * from transaction_tab;
No any row inserted.
someone can elaborate how to use temporary table.


Software/Hardware used:
Oracle 10g
ASKED: April 20, 2011  5:23 AM
UPDATED: May 2, 2011  11:02 PM

Answer Wiki:
If you are running your commands exactly as you posted them, they should work and you should have data in the temporary table, <b>unless your query causes no records to be retrieved</b> (and inserted). However, if you are issuing a COMMIT after the insert, then the temporary table will be empty, as they are transaction-specific by default.
Last Wiki Answer Submitted:  April 20, 2011  3:55 pm  by  carlosdl   63,535 pts.
All Answer Wiki Contributors:  carlosdl   63,535 pts.
To see all answers submitted to the Answer Wiki: View Answer History.


Discuss This Question:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _