Reputation: 66
I am using mysql version 5.5. I have two tables and i am tying to add foreign key constarint but somehow i keep getting this error that-:
Query I'm executing:
alter table ptcact add foreign key(ptcid) references ptccitation(ptcid);
Error I'm receiving:
ERROR 1005 (HY000): Can't create table 'ptc_journal.#sql-496_34' (errno: 150)
My tables:
ptccitaion
with ptcid
as primary key with storage engine = MyIsam
ptcact
with storage engine=InnoDB
Upvotes: 1
Views: 60