Comment by minkeymaniac
2 days ago
in sql server, you can simply add a not null check constraint with nocheck (see my comment with full code)
ALTER TABLE foo WITH NOCHECK ADD CONSTRAINT CheckNotnull CHECK (id IS NOT NULL)
any new values coming in cannot be null but the values already in the table with null are fine... then you can update them to not null over time
No comments yet
Contribute on Hacker News ↗