Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Does DDL for creating Oracle temporary tables commit transaction?

How can I create a temporary table in Oracle db (CREATE GLOBAL TEMPORARY TABLE) without the DDL to commit the transaction?

I want the same behavour like on MySQL. From here:

CREATE TABLE does not automatically commit the current active transaction if you use the TEMPORARY keyword.

like image 658
Mike Argyriou Avatar asked Jun 14 '26 21:06

Mike Argyriou


1 Answers

Yes, DDL commits your transaction.

In addtion to Franek's answer, I want to point out that you should not need to create a global temporary table on the fly as all data within such a table is private to the session that inserted it.

So, if you create the global temporary table once, your session can safely use this table without fear of interfering with other sessions, and the ddl-commit issue becomes non-relevant.

like image 138
René Nyffenegger Avatar answered Jun 17 '26 10:06

René Nyffenegger



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!