I have multiple tables :
Student(StudentID[pk], StudentName)
Qualified(FID[pk], CourseID[pk], dateQ)
Faculty(FID[pk], Fname)
Course(CourseID[pk], CourseName)
And I need to create 2 more, which are Section
, and Registration
.
Section(SectionNo[pk], Semester[pk], CourseID[pk])
Registration(StudentID[pk], SectionNo[pk], Semester[pk])
I first create section without any issues:
create table section(
SectionNo number(28) not null,
Semester varchar(25) not null,
CourseID varchar(25) not null,
constraint sec_pk primary key(SectionNo,Semester,CourseID),
constraint sec_fk foreign key(CourseID) references Course(CourseID)
on delete cascade);
Then I try to make a table called registration, but it gives me the error in the title.
create table registration(
StudentID number(28) not null,
SectionNo number(28) not null,
Semester varchar(25) not null,
constraint reg_pk primary key(SectionNo,StudentID,Semester),
constraint reg_fk foreign key(StudentID) references Student(StudentID)
on delete cascade,
constraint reg_fk2 foreign key(SectionNo,Semester) references
Section(SectionNo,Semester) on delete cascade);