I have a table with column BirthDate(date, null).
I tried to add check constraint in designer BirthDate >= 'January 1, 1980' but got error:
Unable to add constraint 'CK_MyTable'.
The ALTER TABLE statement conflicted with the CHECK constraint "CK_MyTable". The conflict occurred in database "MyDb", table "dbo.MyTable", column 'BirthDate'.
When I tried to add the constraint with this T-SQL script:
ALTER TABLE dbo.MyTable
ADD CONSTRAINT BirthDate CHECK (BirthDate >= 'January 1, 1900');
I got the same error.
What's wrong?