4 ms·
6. ensure there are no nulls in firstname and lastname 7. alter the columns to be NOT NULL Because no non-statistician uses nullable columns, right? Of cour
by MrMcCall 2y ago
6. ensure there are no nulls in firstname and lastname
7. alter the columns to be NOT NULL
Because no non-statistician uses nullable columns, right?
Of course, some dbs (SQLServer?) infer NULL from the empty string, or am I misremembering?
Always having the columns be NOT NULL is a fundamental cheat, after always having a PK, or is that too old school for 2025?
- efxhoy 2y agoThere's nothing wrong with nullable fields when it's appropriate. When kids are born they don't have names. Not all users want to tell you their names. A null value is data too.
- MrMcCall 2y ago> when it's appropriate Yes, it just requires extra care when querying and handling the rows. It's always just easier, if you can, to make it NOT NULL after prepopulating all rows' columns to the empty string (or real data). Sometimes NULL is truly different than the empty string, but that, like you said, is just a kind of data.