Re: ERROR 1005: Can't create table (errno: 150) :: InnoDB
Posted by:
mySQL newbie ()
Date: November 30, 2005 01:11AM
hi there,
i'm facing the same problem with "error 1005" about foreign keys..
please help.. thanx..
CREATE TABLE Student_has_Attendance
(Attendance_Id varchar(20) NOT NULL,
Matric_Id varchar(20) NOT NULL,
CONSTRAINT Has_pk PRIMARY KEY (Matric_Id, Attendance_Id),
CONSTRAINT Has_fk1_Attendanceid FOREIGN KEY (Attendance_Id) REFERENCES Attendance(Attendance_Id),
CONSTRAINT Has_fk2_Matricid FOREIGN KEY (Matric_Id) REFERENCES Student(Matric_Id));