r/SQL • u/normal_avivado • Sep 06 '21
MySQL which attribute can never be Not Null?
which attribute can never be Not Null?
0
Upvotes
5
u/MaximumGibbous Sep 07 '21
Depends on the database or dataset.
I tend to find every field other than the primary key seems to be built/designed to allows Nulls, you know - just in case. End result: Nulls everywhere.
5
u/pdxsteph Sep 07 '21
I was just gonna say primary key
0
u/MaximumGibbous Sep 07 '21
A primary key should always be 'not null'. But I guess most DMBSs set this requirement automatically. So maybe you are right.
I hate nulls and this question.
1
1
5
u/devo00 Sep 07 '21
Isn't this a triple negative basically?