You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/data-warehouse/tables.md
+8-4Lines changed: 8 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,7 +2,7 @@
2
2
title: Tables in Fabric Data Warehouse
3
3
description: Learn how to design and use tables in Microsoft Fabric Data Warehouse, including temporary tables.
4
4
ms.reviewer: xiaoyul, randolphwest
5
-
ms.date: 09/24/2025
5
+
ms.date: 04/03/2026
6
6
ms.topic: how-to
7
7
ms.search.form: Warehouse design and development # This article's title should not change. If so, contact engineering.
8
8
---
@@ -107,7 +107,7 @@ Session-scoped temporary (`#temp`) tables can be created in Fabric Data Warehous
107
107
108
108
These tables exist only within the session in which they are created and last for the duration of that session. They are not visible to other users or sessions and are automatically dropped from the system once the session ends or the #temp table is dropped. These tables are accessible to all users without requiring specific item-level permission.
109
109
110
-
Two types of #temp tables can be created based on specific use cases, non-distributed and distributed.
110
+
Two types of #temp tables can be created based on specific use cases: non-distributed and distributed.
111
111
112
112
- A non-distributed #temp table (mdf-backed) is the default type. The syntax for creating and using non-distributed #temp tables in Fabric Data Warehouse is similar to user tables, but you need to prefix the temp table name with `#`.
113
113
@@ -129,9 +129,13 @@ Two types of #temp tables can be created based on specific use cases, non-distri
129
129
130
130
In the previous script, `data_type1`and`data_type2` are placeholders for supported [Data types in Fabric Data Warehouse](data-types.md).
131
131
132
-
Distributed #temp tables are recommended, as they align with normal user tables; they have unlimited storage, data type support, and T-SQL operations. The syntax for data manipulation and definition is identical to user tables in Fabric Data Warehouse, with prefix `#` added to the table name.
132
+
Distributed #temp tables are recommended, as they align with normal user tables; they have unlimited storage, data type support, and T-SQL operations.
133
133
134
-
In Fabric Data Warehouse, temp tables are not affected by [time travel](time-travel.md) query hints and always return the latest data in the table.
134
+
Other notes about temp tables in Fabric Data Warehouse:
135
+
136
+
- The syntax for data manipulation and definition is identical to user tables in Fabric Data Warehouse, with prefix `#` added to the table name.
137
+
- Temp tables are not affected by [time travel](time-travel.md) query hints and always return the latest data in the table.
138
+
- You can alter distributed temp tables with `ALTER TABLE`, but not MDF-backed temp tables.
Copy file name to clipboardExpand all lines: docs/data-warehouse/transactions.md
+22-3Lines changed: 22 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,7 +2,7 @@
2
2
title: Transactions in Fabric Data Warehouse
3
3
description: Learn how to use transactions and how to insert and modify data in Warehouse tables in Microsoft Fabric.
4
4
ms.reviewer: twcyril
5
-
ms.date: 10/17/2025
5
+
ms.date: 4/7/2026
6
6
ms.topic: how-to
7
7
ms.search.form: Warehouse design and development
8
8
---
@@ -16,7 +16,7 @@ Fabric Data Warehouse supports ACID-compliant transactions. Each transaction is
16
16
17
17
## Explicit transactions
18
18
19
-
You can modify data that is stored in tables in a [!INCLUDE [fabric-dw](includes/fabric-dw.md)] using explicit transactions to group changes together.
19
+
You can modify data that is stored in tables in a [!INCLUDE [fabric-dw](includes/fabric-dw.md)] using explicit transactions to group changes together.
20
20
21
21
For example, you could commit inserts to multiples tables, or, none of the tables if an error arises. If you're changing details about a purchase order that affects three tables, you can group those changes into a single transaction. That means when those tables are queried, they either all have the changes or none of them do. Transactions are a common practice for when you need to ensure your data is consistent across multiple tables.
22
22
@@ -25,6 +25,26 @@ You can use standard T-SQL (`BEGIN TRAN`, `COMMIT TRAN`, and `ROLLBACK TRAN`) sy
For example, Fabric Data Warehouse will treat these schema changes as a single atomic unit:
29
+
30
+
```sql
31
+
-- Sample Syntax---
32
+
BEGIN TRAN;
33
+
ALTERTABLE<table_name> ADD <column_name><type>;
34
+
ALTERTABLE<table_name> DROP COLUMN <column_name>;
35
+
COMMIT;
36
+
```
37
+
38
+
If any statement in the transaction fails, all schema changes are automatically rolled back.
39
+
40
+
Fabric Data Warehouse supports executing the following inside an explicit transaction:
41
+
42
+
-`ALTER TABLE` add nullable columns
43
+
-`ALTER TABLE` drop columns
44
+
-`ALTER TABLE` add or drop `PRIMARY KEY`, `UNIQUE`, and `FOREIGN KEY` constraints with the `NOT ENFORCED` keyword
45
+
- Multiple `ALTER TABLE` statements
46
+
-`ALTER TABLE` on distributed temporary tables
47
+
28
48
### Cross-database query transaction support
29
49
30
50
[!INCLUDE [fabric-dw](includes/fabric-dw.md)] in [!INCLUDE [product-name](../includes/product-name.md)] supports transactions that span across warehouses that are within the same workspace, including reading from the [SQL analytics endpoint of the Lakehouse](data-warehousing.md#sql-analytics-endpoint-of-the-lakehouse). For an example, see [Write a cross-database SQL Query](query-warehouse.md#write-a-cross-database-query).
@@ -129,7 +149,6 @@ INSERT statements always create new parquet files, which means fewer conflicts w
129
149
## Limitations
130
150
131
151
- Distributed transactions are not supported, for example, `BEGIN DISTRIBUTED TRANSACTION`.
132
-
-`ALTER TABLE` is not supported within an explicit transaction.
ms.search.form: T-SQL Surface area # This article's title should not change. If so, contact engineering.
8
8
---
@@ -21,28 +21,28 @@ For SQL database in Fabric, see [Limitations in SQL database (preview)](../datab
21
21
22
22
Fabric Data Warehouse supports T-SQL tables, views, stored procedures, functions, permissions, and security roles.
23
23
24
-
- For more about CREATE/DROPTABLE support in [!INCLUDE [fabric-dw](includes/fabric-dw.md)], see [Tables](tables.md).
24
+
- For more about `CREATE`/`DROP``TABLE` support in [!INCLUDE [fabric-dw](includes/fabric-dw.md)], see [Tables](tables.md).
25
25
- For more about supported data types in [!INCLUDE [fabric-dw](includes/fabric-dw.md)], see [Data types](data-types.md).
26
26
- You can also create T-SQL views, functions, and procedures on top of the tables that reference your Delta Lake data in the [!INCLUDE [fabric-se](includes/fabric-se.md)] of the Lakehouse.
27
27
- Creating, altering, and dropping tables, and insert, update, and delete are only supported in [!INCLUDE [fabric-dw](includes/fabric-dw.md)] in [!INCLUDE [product-name](../includes/product-name.md)], not in the [!INCLUDE [fabric-se](includes/fabric-se.md)] of the Lakehouse.
28
-
- Fabric Warehouse and SQL analytics endpoint both support *standard*, *sequential*, and *nested* CTEs. While CTEs are generally available in Microsoft Fabric, nested CTEs are currently a preview feature. For more information, see [Nested Common Table Expression (CTE) in Fabric data warehousing (Transact-SQL)](/sql/t-sql/queries/nested-common-table-expression?view=fabric&preserve-view=true).
28
+
- Fabric Warehouse and SQL analytics endpoint both support *standard*, *sequential*, and *nested*common table expressions (CTEs). While CTEs are generally available in Microsoft Fabric, nested CTEs are currently a preview feature. For more information, see [Nested Common Table Expression (CTE) in Fabric data warehousing (Transact-SQL)](/sql/t-sql/queries/nested-common-table-expression?view=fabric&preserve-view=true).
29
29
-[TRUNCATE TABLE](/sql/t-sql/statements/truncate-table-transact-sql?view=fabric&preserve-view=true) is supported in [!INCLUDE [fabric-dw](includes/fabric-dw.md)].
30
30
- To change the name of the column in a user table in [!INCLUDE [fabric-dw](includes/fabric-dw.md)], use the `sp_rename` stored procedure.
31
31
- A subset of query and join hints are supported in [!INCLUDE [fabric-dw](includes/fabric-dw.md)]. For more information, see [Hints (Transact-SQL)](/sql/t-sql/queries/hints-transact-sql-query?view=fabric&preserve-view=true).
32
32
- Session-scoped distributed #temp tables are supported in [!INCLUDE [fabric-dw](includes/fabric-dw.md)] in [!INCLUDE [product-name](../includes/product-name.md)].
33
+
- Currently, only the following subset of `ALTER TABLE` operations in [!INCLUDE [fabric-dw](includes/fabric-dw.md)] in [!INCLUDE [product-name](../includes/product-name.md)] are supported:
34
+
- You can `ADD` nullable columns of supported column data types.
35
+
-`DROP COLUMN` is supported.
36
+
-`ADD` or `DROP``PRIMARY KEY`, `UNIQUE`, and `FOREIGN_KEY` column constraints are supported, but only if the `NOT ENFORCED` option has been specified. All other `ALTER TABLE` operations are blocked. There are limitations with adding table constraints or columns when using [Source Control with Warehouse](source-control.md#limitations-in-source-control).
37
+
-`ALTER` distributed temporary tables are supported.
38
+
- Supported `ALTER TABLE` statements can be executed inside an explicit user-defined transaction in [!INCLUDE [fabric-dw](includes/fabric-dw.md)] in [!INCLUDE [product-name](../includes/product-name.md)].
33
39
-`MERGE` syntax is supported and is a generally available feature. For more information, see [MERGE T-SQL syntax](/sql/t-sql/statements/merge-transact-sql?view=fabric&preserve-view=true).
34
40
-[AI functions (preview)](ai-functions.md) enable advanced text processing without leaving your warehouse.
35
41
36
42
### Limitations
37
43
38
44
At this time, the following list of commands is NOT currently supported. Don't try to use these commands. Even though they might appear to succeed, they could cause issues to your warehouse.
39
45
40
-
-`ALTER TABLE ADD`/`ALTER`
41
-
- Currently, only the following subset of `ALTER TABLE` operations in [!INCLUDE [fabric-dw](includes/fabric-dw.md)] in [!INCLUDE [product-name](../includes/product-name.md)] are supported:
42
-
- ADD nullable columns of supported column data types.
43
-
-`DROP COLUMN`
44
-
- ADD or DROP PRIMARY KEY, UNIQUE, and FOREIGN_KEY column constraints, but only if the NOT ENFORCED option has been specified. All other ALTER TABLE operations are blocked.
45
-
- There are limitations with adding table constraints or columns when using [Source Control with Warehouse](source-control.md#limitations-in-source-control).
46
46
-`BULK LOAD`
47
47
-`CREATE USER`
48
48
-`FOR JSON` must be the last operator in the query, and so is not allowed inside subqueries
0 commit comments