Why can't I put a constraint on nvarchar(max)?

后端 未结 3 1119
后悔当初
后悔当初 2020-12-09 14:24

Why can\'t I create a constraint on an nvarchar(max) column? SQL Server will not allow me to put a unique constraint on it. But, it allows me to create a unique

3条回答
  •  离开以前
    2020-12-09 14:56

    A unique constraint is actually an index, and nvarchar(max) cannot be used as a key in an index.

提交回复
热议问题