0
Why we have to use when define a primary key with not null. Because I know that primary also includes uniquness of the column
Constraints
2 odpowiedzi
0
most of the dbms will automaticly set a PK to NOT NULL, so you dont really need to specify NOT NULL
a story for pratical side of it
i've heard a story of a man with NULL custom license plate for his car.
but unknowningly he kept getting traffic ticket, which not his. he havent done any violation, but the ticket keep piling up and he need to pay for it.
turns out whenever any officer forget to record the plate number into the system, it'll be saved as NULL in the database.
NULL as a key in that case really cause an unexpected behavior of the system, and cause quite a monetary loss for someone
0
Thank u for clearly explanation