Home > database >  ORA - 01735: invalid ALTER TABLE options (Oracle SQL)
ORA - 01735: invalid ALTER TABLE options (Oracle SQL)

Time:10-23

SQL> The alter table would
2 add constraint pk_tea_no primary key (t_no course_no);

Table is changed,

SQL> The alter table would
2 add constraint fk_tea_no foreign key (t_no) references teaalter table would
3 add the constraint fk_course_no foreign key (course_no) references course (course_no); Cher (t_no) on delete cascade;
Add the constraint fk_tea_no foreign key (t_no) references teaalter table would
*
Line 2 error:
ORA - 01735: invalid ALTER TABLE options

Everybody is in god to help us see where is wrong?

My small white one, on the Internet looking for a beginner project (below is the url), want to practice, just make a mistake here,

https://blog.csdn.net/anhldd/article/details/8296549

CodePudding user response:

Is there a line break in your statement, remove the newline try,

CodePudding user response:

2 add constraint fk_tea_no foreign key (t_no) references teaalter table would
3 add the constraint fk_course_no foreign key (course_no) references course (course_no)

It's obvious that the two rows of grammar is different, 2, 3,

CodePudding user response:

refer to the second floor selling fruit net reply:
2 add constraint fk_tea_no foreign key (t_no) references teaalter table would
3 add the constraint fk_course_no foreign key (course_no) references course (course_no)

It's obvious that the two rows of grammar is different, 2, 3,


That how to change the 2 to the right?

CodePudding user response:

Who would. T_no reference?
  • Related