This is my first time using this site, and I have made various searches for SQL Database syntax and use but couldn't find a specific place to post this . . . I'm having trouble in SQL, with the table Players, it requires two primary keys. I'd added one successfully . . .But when I come to do the same for TeamID . . .Code:ALTER TABLE Players ADD CONSTRAINT fk_PlayerTypeID FOREIGN KEY (PlayerTypeID) REFERENCES PlayerTypes(PlayerTypeID)
It says its already been created. I understand that it has already been created as a foreign key in the TeamLists table-how do I go about making it a foreign key in two tables? If that makes sense, any help would be appreciated!Code:ALTER TABLE Players ADD CONSTRAINT fk_TeamID FOREIGN KEY (TeamID) REFERENCES Teams(TeamID)