Collections:
Transaction Commit When DDL Statement Executed in Oracle
What Happens to the Current Transaction If a DDL Statement Is Executed in Oracle?
✍: FYIcenter.com
If a DDL statement is executed, the current transaction will be committed and ended. All the database changes made in the current transaction will become permanent. This is called an implicit commit by a DDL statement. The following tutorial exercise shows you that the CREATE TABLE statement forced the current transaction to be committed and ended. The subsequent ROLLBACK statement has no effects on the closed transaction.
SQL> connect HR/fyicenter SQL> INSERT INTO fyi_links (url, id) 2 VALUES ('oracle.com', 112); SQL> INSERT INTO fyi_links (url, id) 2 VALUES ('sql.com', 113); SQL> CREATE TABLE fyi_temp AS (SELECT * FROM fyi_links); Table created. SQL> ROLLBACK; Rollback complete. SQL> SELECT * FROM fyi_links; ID URL NOTES COUNTS CREATED ------- ---------------- ---------- ---------- --------- 101 fyicenter.com 07-MAY-06 110 centerfyi.com 07-MAY-06 112 oracle.com 07-MAY-06 113 sql.com 07-MAY-06
2019-09-04, 791👍, 0💬
Popular Posts:
How to run Queries with "sqlcmd" tool in SQL Server? "sqlcmd" is a client tool that you can use to i...
How To List All User Names in a Database in SQL Server? If you want to see a list of all user names ...
How To Replace NULL Values in Expressions using ISNULL() in SQL Server Transact-SQL? As you learned ...
What are binary literals supported in SQL Server Transact-SQL? Binary literals in Transact-SQL are s...
What Is Open Database Communication (ODBC) in Oracle? ODBC, Open Database Communication, a standard ...