3

enter image description here

A Picture is worth thousand word. In the above picture we can add FK constraint 1-1, like I can reference UserId to another tables column but If the situation is like this ,

ALTER TABLE `userfrnd_source`
  ADD CONSTRAINT `userfrnd_source_ibfk_2` FOREIGN KEY (`userId`,`friendId`) 
  REFERENCES `user` (`userId`,`friendId`) 
  ON DELETE CASCADE ON UPDATE CASCADE

How can I do this through PHPMyadmin, I know Using SQL we can do but with this tab is it possible?

1 Answers1

0

As documented in the FAQ:

3.6 What is currently not supported in phpMyAdmin about InnoDB?

In Relation view, having more than one index column in the foreign key.

eggyal
  • 122,705
  • 18
  • 212
  • 237