开发者

ORACLE - tables

After entering code to create a new table in SQL ORACLE, would the changes be saved if I was to log out o开发者_JAVA百科f the SQL Session?


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.


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


In short, "yes". DDL statements are committed immediately after execution. If your script also includes INSERT statements to populate those tables, then those would not be saved without a commit of their own.


Umm, what? Yes all changes to Data and Table structures are immediately saved (unless part of a transaction, which waits till the end of the transaction to permanently save) The things that are dependent upon your Session are session variables and session settings.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜