Composite keys as Foreign Key?
- by paulio
I have the following table...
TABLE: Accounts
ID (int, PK, Identity)
AccountType (int, PK)
Username (varchar)
Password (varchar)
I have created a composite key out of ID and AccountType columns so that people can have the same username/password but different AccountTypes.
Does this mean that for each foreign table that I try and link to I'll have to create two columns?
I’m using SQL Server 2008