Questions tagged «heidisql»

30
mysql外键约束格式错误
我有两个表,table1是一列父表ID,并table2与一列IDFromTable1(而不是实际的名称),当我把一个FK上IDFromTable1,以ID在table1我得到的错误Foreign key constraint is incorrectly formed error。如果要删除记录,我想删除表2记录table1。谢谢你的帮助 ALTER TABLE `table2` ADD CONSTRAINT `FK1` FOREIGN KEY (`IDFromTable1`) REFERENCES `table1` (`ID`) ON UPDATE CASCADE ON DELETE CASCADE; 让我知道是否需要其他信息。我是mysql新手
173 mysql  sql  heidisql 
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.