WHY DOES A PRIMARY KEY HAVE DUPLICATE VALUES
Hi,
So I decided to try grouping by result by salary and not emp_no but I got a result showing me duplicate values for the emp_no I remember that PK are not supposed to have duplicate values in a column, so I am wondering why this is different.
Thanks
1 answers ( 0 marked as helpful)
Hi Oyindamola!
Thanks for reaching out!
In this case we have a composite primary key - it consists of more than 1 column. So, the idea is that the combination of columns should be unique, but some of the columns can have duplicates. I attach a
screenshot.
Hope this helps.
Best,
Tsvetelin