Temporary Table in Oracle 10g

5 pts.
Tags:
Oracle
Oracle 10g
Oracle Tables
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

Answer Wiki

Thanks. We'll let you know when a new response is added.

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.

Discuss This Question:  

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following