Hello very good I have the following table
With the following primary keys and constraints
But when I launch a query the field "IDDOCUMENT"
I see that it can be repeated, what makes me doubt is that in the table I have an Alternativekey called AK_PERSON and withStrint UNIQUE, therefore I don't know why the idDocuument
.
I am clear that the primary key that is the field IdPerson
cannot be repeated because the primary key but I do not understand why "IdDocument"
it is repeated.
Why can this be happening?
The column
IDDOCUMENT
does not have any constraintsUNIQUE
, so it can be repeated.Add a UNIQUE constraint to the table