开发者

How to set VS2010 SQL table column to be unique?

开发者 https://www.devze.com 2023-01-16 18:07 出处:网络
In Microsoft SQL Server 10, how do I开发者_开发知识库 set constraint, that column in table with data type nchar(50) must be unique? ALTER TABLE yourtable

In Microsoft SQL Server 10, how do I开发者_开发知识库 set constraint, that column in table with data type nchar(50) must be unique?


ALTER TABLE yourtable
  ADD CONSTRAINT yourColumn
  UNIQUE (uniqueConstraintName)
0

精彩评论

暂无评论...
验证码 换一张
取 消