SQLite Forum

CHECK violation during table definition ignored, normal or bug?
Login
To a certain extent this isn't much different from just having a column defined as "s text not null" right? The default value for that column is NULL, but that violates the constraint.

How about a case where you want NULL to be a valid value, but you don't want there to be a default. That is, you want someone to be required to explicitly enter NULL rather than having it be NULL by accident. You can't just say "not null" or something like that. But setting the default to something that violates a constraint (as in your example) would do that.

(I don't have a real world use case in mind right at the moment, I'm just "thinking out loud" as it were)