Hello everyone,
I just started learning SQL and I was doing great so far and then I ran into a little problem. I am sure it's something small that I'm overlooking, but I am getting this message SP2-0734: unknown command beginning "CONSTRAINT..." - rest of line ignored., and I am not sure why, I have tried several different things and still get the same message. My other tables that are similar work just fine, so I have no clue. Here is the whole CREATE statement:
SQL> CREATE TABLE Course_Offering
2 (
3 CourseNo Varchar(10) NOT NULL,
4 Year Number(2) NOT NULL,
5 Semester Char(2) NOT NULL,
6 ProfNo Number(2) NOT NULL,
7 Room Varchar(5) NOT NULL,
8 Time Date NOT NULL,
9 Day Varchar(5) NOT NULL,
10
SQL> CONSTRAINT PKCourse_Offering PRIMARY KEY (CourseNo, Year, Semester, ProfNo),
SP2-0734: unknown command beginning "CONSTRAINT..." - rest of line ignored.
SQL> CONSTRAINT FKCOSemester FOREIGN KEY (Semester) References Semester_Master,
SP2-0734: unknown command beginning "CONSTRAINT..." - rest of line ignored.
SQL> CONSTRAINT FKCOCourseNo FOREIGN KEY (CourseNo) References Course_Mast,
SP2-0734: unknown command beginning "CONSTRAINT..." - rest of line ignored.
SQL> CONSTRAINT FKCOProfNo FOREIGN KEY (ProfNo) References Professor_Master);
SP2-0734: unknown command beginning "CONSTRAINT..." - rest of line ignored.
SP2-0044: For a list of known commands enter HELP
Thank you for any advice you have.