Forum Discussion
Support for primary keys and foreign keys
- 1 year ago
Hi pmscorca , Fabric SQL database supports primary keys/foreign keys and all other objects that you may be familiar in Azure SQL Database or SQL Server.
Hi pmscorca,
Please check the below Microsoft documentation link:
Table constraints
SQL analytics endpoint and Warehouse in Microsoft Fabric support these table constraints:
- PRIMARY KEY is only supported when NONCLUSTERED and NOT ENFORCED are both used.
- FOREIGN KEY is only supported when NOT ENFORCED is used.
- UNIQUE constraint is only supported when NONCLUSTERED and NOT ENFORCED are both used.
https://learn.microsoft.com/en-us/fabric/data-warehouse/table-constraintsIf this reply helped solve your problem, please consider clicking "Accept as Solution" so others can benefit too. And if you found it useful, a quick "Kudos" is always appreciated, thanks!
Best Regards,
Maruthi
Hi, but I'm referring to a Fabric SQL Database and not warehouse/lakehouse.
Thanks
- idrismotiwala1 year agoMicrosoft Employee
Hi pmscorca , Fabric SQL database supports primary keys/foreign keys and all other objects that you may be familiar in Azure SQL Database or SQL Server.