Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ORACLE - tables

After entering code to create a new table in SQL ORACLE, would the changes be saved if I was to log out of the SQL Session?

like image 722
Computeristic Avatar asked May 15 '26 13:05

Computeristic


2 Answers

Yes, your table definitions are saved; Oracle DDL has an implicit transaction*. Other databases, such as PostrgreSQL, do have transactional DDL, but with Oracle, it is automatic, so be careful.

* Oracle Transaction Management: If the current transaction contains any DML statements, Oracle first commits the transaction, and then runs and commits the DDL statement as a new, single statement transaction.

like image 159
Ryan McGeary Avatar answered May 18 '26 14:05

Ryan McGeary


The correct answer is that Oracle DDL uses an implicit transaction - there's no opportunity to the transaction back, it's immediately committed.

like image 45
OMG Ponies Avatar answered May 18 '26 13:05

OMG Ponies



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!