I am getting an error no 150 when i try to create relationships between three tables.
Here are the statements : -
TABLE A
create table a(id1 int(7),id2 int(7),primary key (id1));
TABLE B
create table b(id1 int(7),id2 int(7),primary key(id2));
TABLE C
create table c(id1 int(7),id2 int(7),foreign key(id1) references a(id1) on delete cascade,foreign key(id2) references b(id2));
any idea as to where m going wrong?
Here are the statements : -
TABLE A
create table a(id1 int(7),id2 int(7),primary key (id1));
TABLE B
create table b(id1 int(7),id2 int(7),primary key(id2));
TABLE C
create table c(id1 int(7),id2 int(7),foreign key(id1) references a(id1) on delete cascade,foreign key(id2) references b(id2));
any idea as to where m going wrong?
Comment