views:

14

answers:

1

I SSMS (2008R2) menu Tools --> Options --> Designers --> Table and Database Designers --> "Warn on null primary keys" I played checking and unchecking this checkbox but could not detect the differences.
What is it for?

My related questions, probably:

+1  A: 

OK, it would seem that when this is checked, if any of the columns are nullable, it will produce a warning stating

Primary Key cannot be created on Column 'X' because it allows null values.

Clear the Allow Nulls check box for each column in the primary key.

Whereas if this is not check, and you make columns the primary key, they will automatically be changed to non nullable.

astander