sqltransactionsddlcreate-table

Is it possible to roll back CREATE TABLE and ALTER TABLE statements in major SQL databases?


I am working on a program that issues DDL. I would like to know whether CREATE TABLE and similar DDL can be rolled back in

Describe how each database handles transactions with DDL.


Solution

  • http://wiki.postgresql.org/wiki/Transactional_DDL_in_PostgreSQL:_A_Competitive_Analysis provides an overview of this issue from PostgreSQL's perspective.

    Is DDL transactional according to this document?

    SQLite also appears to have transactional DDL as well. I was able to ROLLBACK a CREATE TABLE statement in SQLite. Its CREATE TABLE documentation does not mention any special transactional 'gotchas'.