If you’re getting an error that reads something like “Cannot insert the value NULL into column ‘CatId’, table ‘demo.dbo.Cats’; column does not allow nulls. INSERT fails” in SQL Server, it’s because you’re trying to insert a NULL value into non-nullable column (i.e. a column with a NOT NULL
constraint).
We can’t insert NULL values into non-nullable columns.
To fix this issue, insert a non-NULL value.
Continue reading