谁能告诉我这里有什么问题?
从命令行中的第15行开始出错 -
CREATE TABLE USERINSC521SP18_EAA52.EmployeePhone
(
EmployeeID int,
EmployeePhone varchar(30) NOT NULL,
Primary key (EmployeeID),
EmployeeID int REFERENCES Employee(EmployeeID) on DELETE NO ACTION
)
错误:
ORA-00957:重复列名称
00957. 00000 - “重复列名”*原因:
*行动:
答案 0 :(得分:0)
你似乎想要:
CREATE TABLE USERINSC521SP18_EAA52.EmployeePhone (
EmployeeID int primary key references Employee(EmployeeID) on DELETE NO ACTION,
EmployeePhone varchar(30) NOT NULL
);
但为什么不将EmployeePhone
存储在Employee
?
答案 1 :(得分:0)
应:
EmployeeID int REFERENCES Employee(EmployeeID) on DELETE NO ACTION)
是,
FOREIGN KEY(EmployeeID) REFERENCES Employee(EmployeeID) on DELETE NO ACTION)