I\'m wondering if it is possible to run multiple DDL statements inside a transaction. I\'m specially interested on SQL Server, even though answers with other databases (Orac
Could it be that in MS SQL, Implicit transactions are triggered when DDL and DML statements are run. If you toggle this off does this help, use SET IMPLICIT_TRANSACTIONS
EDIT: another possibility - You can't combine CREATE VIEW with other statements in the same batch. CREATE TABLE is ok. You separate batches with GO.
EDIT2: You CAN use multiple DDL in a transaction as long as separated with GO to create different batches.