Hoe drop ik een foreign constraint als ik m zo gemaakt heb:
sql> ALTER TABLE `tbl` ADD CONSTRAINT /*`[_tbl_]_ibfk_[_x_]`*/ FOREIGN KEY (`l_col`) REFERENCES `f_tbl` (`f_col`) ON DELETE CASCADE ON UPDATE CASCADE;
en de naam is 'hitlist_ibfk_2'
Het volgende werkt niet:
sql> ALTER TABLE `tbl` DROP CONSTRAINT `hitlist_ibfk_2`;
De error:
(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 'CONSTRAINT `hitlist_ibfk_2`' at line 1
Danke
462 views