CREATE TABLE Degree_Classes
(DegreeClassID int NOT NULL,
ClassID INT,
DegreeID INT,
ClassCode VARCHAR(30),
ClassName VARCHAR(100),
Description TEXT,
CONSTRAINT DegreeClassID_PK
Primary KEY (DegreeClassID),
CONSTRAINT classID_FK
FOREIGN KEY (classID)
REFERENCES Classes(classID),
CONSTRAINT DegreeID_FK
FOREIGN KEY (DegreeID)
REFERENCES Degrees(DegreeID)
);
Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.
Have a better answer? Share it in a comment.
From novice to tech pro — start learning today.
As I wrote, first check:
(1) Do you have Classes table? If yes, make sure the ClassId column exists and it is a primary key.
(2) Do you have Degrees table? If yes, make sure the DegreeId column exists and is a primary key.
(3) Lastly, run the code I posted with comma correction.