Usually a compound pk is not allowed to have null-values in the database.
Technically we would say: Why not, a null
can be a value too.
The DB-Analyst would ask: Ok, if i sort 1,2,3,4,null
,5. Would you say null
is before 1 or after 5?
Therefore PostgreSQL, Oracle, MySQL will not support null-values in compound primary keys.