How to set any column as primary key in Azure SQL data warehouse

shweta_kaushish picture shweta_kaushish · Apr 20, 2018 · Viewed 11.5k times · Source

I am trying to set one column in DB as primary key but I always get this error:

Enforced unique constraints are not supported in Azure SQL Data Warehouse. To create an unenforced unique constraint you must include the NOT ENFORCED syntax as part of your statement.

While doing R & D,I found that there is no concept of primary keys & foreign keys in Azure SQL data warehouse then how can we accomplish this in it.

Any ideas?

Answer

DEEPAK LAKHOTIA picture DEEPAK LAKHOTIA · Apr 22, 2018