CREATE TABLE Driver(
Driver_ID number(10) Primary key,
DriverFname varchar(15),
DriverLname varchar(15),
Train_ID number(10) Foreign key References
Train(Train_ID)
);
我收到此错误ORA-00907:当我尝试运行它时缺少右括号
答案 0 :(得分:1)
取出Foreign key
- 您不需要这样做。只是Train_ID number(10) References Train(Train_ID)
所以运行这个:
CREATE TABLE Driver(
Driver_ID number(10) Primary key,
DriverFname varchar(15),
DriverLname varchar(15),
Train_ID number(10) References
Train(Train_ID)
);