1

Possible Duplicate:
Setting up foreign keys in phpMyAdmin?

ALTER table podcategory add FOREIGN KEY (category_id) 
           REFERENCES category(category_id)
ON UPDATE RESTRICT
ON DELETE CASCADE

When i send script in phpmyadmin i get error

Can't create table './C292729_T25027/#sql-be0_30ed238.frm' (errno: 150)

How to add this FOREIGN KEY?


1 답변


0

try this type:

ALTER TABLE `aaaa` ADD CONSTRAINT fk_comp_id FOREIGN KEY ( `comp_id` ) REFERENCES `comps` ( `id` ); 

Or this SO answer/question might be able to help you out for sure: Setting up foreign keys in phpMyAdmin?


Linked


Related

Latest