Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

2
  • This is a first - I normally agree with @DocBrown answers. I agree with the first answer - if there is no comment then the field should be null. Otherwise standard database functions like COUNT will return wrong results and other queries are complicated compared with "COMMENT IS NULL". Commented Aug 24, 2022 at 6:40
  • @kiwiron: quite the opposite. If you allow NULL values and empty strings in a column, but both are semantically equal, the correct query will have to be COMMENT IS NULL OR COMMENT='', or ISNULL(COMMENT,'')=''. That is definitely more complicated than COMMENT='', which is sufficient with the NOT NULL constraint in place. Commented Aug 24, 2022 at 10:00