CREATE TABLE and transactions

sybase-asetransaction

Is there a way to use CREATE TABLE inside of a transaction in Sybase?

Best Answer

Assuming we're talking about Sybase ASE ...

To allow DDL (eg, create table) to be performed within a transaction the DBA can configure the database (where the DDL is to be performed) with the following:

sp_dboption <dbname>,'ddl in tran',true

NOTE: ddl in tran == true is not recommended since this can lead to excessive blocking, and in some rare cases deadlocking, on system table activity