Reputation: 65288
I would like to create a table and perform an insertion all in one transaction. Can this be done in MySQL?
Upvotes: 0
Views: 2088
Reputation: 34063
According to MySQL:
Some statements cannot be rolled back. In general, these include data definition language (DDL) statements, such as those that create or drop databases, those that create, drop, or alter tables or stored routines.
Upvotes: 1
Reputation: 9425
No, MySQL (well, InnoDB) does not support transactions for DDL statements.
Upvotes: 0