当我运行它时,我的代码有什么错误我有这个错误
ORA-00911: caractère non valide
Create table contient(
Num_Spect varchar(30) not null,
Code_Module varchar(30) not null,
constraints pk_contient primary key (Num_Spect,Code_Module),
constraints fk_spect _t_contient FOREIGN key (Num_Spect) REFERENCES specialite(Num_Spect),
constraints fk_module _t_contient FOREIGN key (Code_Module) REFERENCES module(Code_Module));
答案 0 :(得分:0)
单词constraints
无效 - 应为constraint
:
Create table contient
(Num_Spect varchar(30) not null,
Code_Module varchar(30) not null,
constraint pk_contient
primary key (Num_Spect, Code_Module),
constraint fk_spect_t_contient
FOREIGN key (Num_Spect) REFERENCES specialite(Num_Spect),
constraint fk_module_t_contient
FOREIGN key (Code_Module) REFERENCES module(Code_Module));
祝你好运。
答案 1 :(得分:0)
从脚本中删除autoincrement
并尝试。
_t_contient