宝慕林4294392
字段没有啊FK_member_cotegory` ()括号中是member外键字段,你这里是空的REFERENCES `cotegory` ()括号中是引用的主键表cotegory的主键字段,你这里是空的可达是要报错的啊 ,建议修改成 如下形式ALTER TABLE `vshare`.`member` DROP PRIMARY KEY,ADD PRIMARY KEY (`id`),ADD CONSTRAINT `FK_member_cotegory` FOREIGN KEY `FK_member_cotegory` (`cotegoryID`)REFERENCES `cotegory` (`ID`)ON DELETE RESTRICTON UPDATE RESTRICT;