如何指定一个表有多个构成主键的列?当我运行这个sql语句时,我得到“未知数据类型”(“
CREATE TABLE SH_LEAGUE_CONTACT_TEAM_ROLE(ROLE_NAME VARCHAR NOT NULL,
TEAM_ID INT NOT NULL,
CONTACT_ID INT NOT NULL,
FOREIGN_KEY(TEAM_ID) REFERENCES SH_LEAGUE_TEAM(ID),
FOREIGN_KEY(CONTACT_ID) REFERENCES SH_LEAGUE_CONTACT(ID),
PRIMARY KEY(ROLE_NAME, TEAM_ID, CONTACT_ID));
答案 0 :(得分:4)
您的陈述中有拼写错误,您使用FOREIGN_KEY
(一个字)代替FOREIGN KEY
(两个字)。