How can I create a Table in SQL Server that has a Primary Key
and a Foreign Key
, but the Primary Key data should be repeated?
For example:
PK FK
1 100
2 100
1 200
3 100
4 200
4 100
4 300
How can I create a Table in SQL Server that has a Primary Key
and a Foreign Key
, but the Primary Key data should be repeated?
For example:
PK FK
1 100
2 100
1 200
3 100
4 200
4 100
4 300
A primary key is unique by definition, you can't have repeated values for your primary key column(s).