Why do I have this error at the end? Everything seems to be typed right but it
Fantastic news! We've Found the answer you've been seeking!
Question:
Why do I have this error at the end? Everything seems to be typed right but it still gives me the foreign key constraint error?
mysql> create table vendor ( vname varchar(30) primary key, address varchar(100));
Query OK, 0 rows affected (0.29 sec)
mysql> mysql> create table department (
-> dname varchar(30) primary key,
-> phone char(10) not null);
Query OK, 0 rows affected (0.31 sec)
mysql> create table supply (
-> dname varchar(30),
-> vname varchar(30),
-> last_meeting_date date,
-> primary key (dname, vname),
-> foreign key (dname) references department(dname),
-> foreign key (vname) references vendor(vname));
ERROR 1215 (HY000): Cannot add foreign key constraint
Related Book For
Fundamentals of Case Management Practice Skills for the Human Services
ISBN: 978-1305094765
5th edition
Authors: Nancy Summers
Posted Date: