How can I create a unique constraint on my column (SQL Server 2008 R2)?

前端 未结 4 706
伪装坚强ぢ
伪装坚强ぢ 2020-12-07 21:44

I have SQL Server 2008 R2 and I want to set a unique column.

There seems to be two ways to do this: \"unique index\" and \"unique constraint\". They are not much

4条回答
  •  悲&欢浪女
    2020-12-07 22:15

    To create these constraints through the GUI you need the "indexes and keys" dialogue not the check constraints one.

    But in your case you just need to run the piece of code you already have. It doesn't need to be entered into the expression dialogue at all.

提交回复
热议问题