Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Did you hear? There's a new SQL AI Developer certification (DP-800). Start preparing now and be one of the first to get certified. Register now

twcyril

ALTER TABLE inside explicit transactions in Fabric Data Warehouse (Generally Available)

Schema evolution is a fact of life for modern analytics platforms. As data models grow, teams need to add columns, drop unused fields, and evolve constraints—often as part of tightly controlled deployment pipelines.

Fabric DW supported transactional execution for key table‑focused DDLs like CREATE TABLE, DROP TABLE, TRUNCATE TABLE, CTAS and sp_rename—with this release, ALTER TABLE now joins that set, enabling truly atomic and safe schema evolution.

A new approach to schema changes

Previously, supported ALTER TABLE statements in Fabric Data Warehouse ran outside of explicit user transactions. Attempting to include ALTER TABLE within a BEGIN TRAN—COMMIT block caused the operation to fail with the error: Transaction failed because this DDL statement is not allowed inside a snapshot isolation transaction.

This presented significant challenges for enterprise clients:

  • No atomicity for schema evolution—multi-step migrations could fail halfway through, leaving warehouses in partially updated states.
  • Brittle CI/CD pipelines—because ALTER TABLE couldn’t participate in explicit user transactions while other DDLs and DMLs could, schema migrations that combined ALTER TABLE with other operations couldn’t be executed atomically in a single transaction—adding deployment complexity and increasing failure risk.
  • Manual recovery on failure—when a deployment failed mid-flight, teams often had to manually diagnose and fix schema drift.

What’s new: ALTER TABLE inside BEGIN TRAN

Supported ALTER TABLE operations can now execute inside an explicit user-defined transaction in Fabric Data Warehouse

Now, you’re able to write:

-- Sample Syntax---
BEGIN TRAN;
ALTER TABLE <table_name> ADD <column_name> <type>;
ALTER TABLE <table_name> DROP COLUMN <column_name>;
COMMIT;

Additionally, Fabric will process these schema changes as a single atomic operation.

If any statement in the transaction fails, all schema changes are automatically rolled back - leaving your warehouse in a consistent, predictable state

Learn more: ALTER TABLE syntax for Warehouse in Fabric.

Why this matters

Atomic, All-or-Nothing Schema Changes

Multiple ALTER TABLE statements can now be grouped and committed together. No more partial updates.

Stronger Correctness Guarantees

Schema evolution now follows the same transactional semantics as data changes, aligned with Fabric DW’s snapshot isolation and rollback model.

Safer Enterprise Deployments

CI/CD pipelines become simpler and more reliable. Failures automatically roll back without manual intervention.

Supported scenarios

Fabric Data Warehouse supports executing the following inside an explicit transaction:
  • ALTER TABLE Add nullable columns
  • ALTER TABLE Drop columns
  • ALTER TABLE Add or drop NOT ENFORCED PRIMARY KEY, UNIQUE, and FOREIGN KEY constraints
  • Execute multiple ALTER TABLE statements atomically
  • ALTER distributed temporary tables
If any operation fails, the entire transaction is rolled back automatically.

Note: Certain operations—such as adding non-nullable columns / ALTER COLUMN / ALTER on non-distributed temp tables—remain unsupported at this time and will continue to surface clear, actionable error messages.

Refer to the Transactions in Fabric Data Warehouse documentation for the most up-to-date list of supported features, as Fabric Data Warehouse continues to evolve and add new capabilities.

A foundational step forward

Transactional DDL is a core expectation for enterprise data platforms. By bringing ALTER TABLE into explicit user transactions, Fabric Data Warehouse unlocks safer, more predictable schema evolution workflows.

This release is more than a syntax change. It’s a step toward stronger guarantees of correctness and operational trust for customers building mission-critical analytics on Fabric.