![]() |
|
首页 │ Apache │ Linux│ Java│ MySQL│ 注册│帮助 | |||
相关问题
post表和categories表我已经定义为使用InnoDB引擎;
post表中的post_category我已经建立了索引(INDEX);
但在post表中使用sql语句'FOREIGN KEY (`post_category`) REFERENCES categories (`cat_id`) ON DELETE CASCADE' 定义外键时还是出现如下错误
#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'FOREIGN KEY (`post_category`) REFERENCES categories (`cat_id`) ON DELETE CASCADE' at line 1
提问者:imgotop 08-22 15:03
答复

