is it possible to have a foreign key with two reference tables?
here's the script and we're having a problem inserting into this table
CREATE TABLE Class(
idNumber varchar(30) not null,
day varchar(10) not null,
time varchar(20) not null,
foreign key(idNumber) REFERENCES ThesisMember(idNumber),
foreign key(idNumber) REFERENCES Faculty(idNumber),
PRIMARY KEY(idNumber,day,time)
);
CONSTRAINT `class_ibfk_1`
FOREIGN KEY (`idNumber`) REFERENCES `thesismember` (`idNumber`))
SQL Statement:
INSERT INTO `thesis`.`class`
(`idNumber`, `day`, `time`) VALUES ('9990', 'F', '0940-1110')
the Faculty table has the "9990" idNumber.