Press "Enter" to skip to content

Unique Clustered Indexes and Included Columns

Greg Dodd gives it away in the title:

I needed to add a Unique Constraint today to a table. We could go ahead and just add a constraint, but the data I wanted to constrain on was already indexed. Could I just make that a Unique Index and be done with it? Let’s find out with the following table:

Let’s, shall we?