Monday, January 20, 2014

The old True, False, NULL problem

Say you've got an application where a new check box was added to the screen and a new column was added to the table. The possible values of the check box are are True and False. Maybe the existing rows in the table are set to NULL when the new column is added.

Are existing rows updated?

Does the column have a default value?

Does the application break on rows where the column is set to NULL?

I think existing rows should be set to True or False, but sometimes they're not.

It seems confusing if NULL is being interpreted as True or False.

Just something to check for.

No comments: