DDL cannot be rolled back because the DDL is not transactional.
To implement automatic rollback. (Begin,commit,rollback), only DML is included in the SQL statement.
In this way, automated publishing is restricted to the canonical format.
Therefore, one-size-fits-all approach is to assume that all SQL does not support transactions, self-defined rollback SQL scripts, and can be rolled back with code in the case of an error.
Rather than relying on the functionality of the database itself.
========================
DDL and DML
DDL (data definition Language)
CREATE table creating tables ALTER TABLE modify tables drop table Delete tables TRUNCATE TABLE delete all rows in tables CREATE index drop Index Delete Index when executing a DDL statement, Oracle commits the current transaction before and after each statement. If the user inserts a record into the database using the Insert command, a DDL statement (such as CREATE table) executes, and the data from the Insert command is committed to the database. When the DDL statement execution completes, the DDL statement is automatically committed and cannot be rolled back.
DML (data manipulation Language) Insert records inserted into database update modify database record delete delete database records when the Execute DML command is not committed, it will not be seen by other sessions. Unless a DDL command or DCL command is executed after the DML command, or the user exits the session or terminates the instance, a commit command is automatically issued to make the uncommitted DML command commit.
DDL, DML not all SQL can be automatically rolled back