我有一个交叉表:
CREATE TABLE IF NOT EXISTS `foo` (
`a` smallint(5) unsigned NOT NULL,
`b` tinyint(3) unsigned NOT NULL,
PRIMARY KEY (`a`,`b`),
KEY `b` (`b`) # why?
) ENGINE=InnoDB;
为什么phpMyAdmin
添加:
KEY `b` (`b`)
我在Relational view
到b
列中添加外键吗?