SQL SERVER – Fix Error: 8111 – Cannot define PRIMARY KEY constraint on nullable column in table – Error: 1750 – Could not create constraint. See previous errors
A very common error new developers receive when they begin with SQL Server and start playing with the keys. Let us first run following code which will generate an error 8111. -- Create Table CREATE TABLE test (ID INT, Col1 INT, Col2 VARCHAR(100)) GO -- Now create PK on ID…
Read More

