Mulugeta Maru wrote:
I was able to create all the tables below except
ENROLLS. Can anyone please help me what is wrong in my
syntax in the section that faild to create the ENROLLS
table.

<snip>

CREATE TABLE ENROLLS
(
  enrollmentID INT NOT NULL AUTO_INCREMENT,
  courseID SMALLINT NOT NULL,
  sectionID SMALLINT NOT NULL,
  studentID SMALLINT NOT NULL,
  grade SMALLINT,
  PRIMARY KEY(enrollmentID),
  INDEX(courseID),
  REFERENCES COURSES(courseID)ON UPDATE CASCADE ON DELETE CASCADE,
  INDEX(sectionID),
  REFERENCES SECTIONS(sectionID)ON UPDATE CASCADE ON DELETE CASCADE,
  INDEX(studentID),
  REFERENCES STUDENTS(studentID)ON UPDATE CASCADE ON DELETE CASCADE
)TYPE=INNODB;

Maru

When asking why something didn't work, you should always include the error you received. In this case, I expect it was a syntax error. Perhaps you meant for table ENROLLS to have some FOREIGN KEYS?


Michael


-- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]



Reply via email to