Hey guys,
I am facing this problem of deleting 2 tables i.e.
CREATE TABLE `t1` (
`s4` int(11) default NULL,
`s5` int(11) default NULL,
PRIMARY KEY (`s4`),
KEY `s5_ind` (`s5`)
) ENGINE=InnoDB DEFAULT CHARSET=cp1251;
CREATE TABLE `t2` (
`s2` int(11) NOT NULL default '0',
`s3` int(11) default NULL,
PRIMARY KEY (`s2`),
KEY `s3_ind` (`s3`)
) ENGINE=InnoDB DEFAULT CHARSET=cp1251;
ALTER TABLE `t1`
ADD CONSTRAINT `t1_ibfk_2` FOREIGN KEY (`s5`) REFERENCES `t2` (`s2`) ON DELETE CASCADE;
ALTER TABLE `t2`
ADD CONSTRAINT `t2_ibfk_1` FOREIGN KEY (`s3`) REFERENCES `t1` (`s4`) ON DELETE CASCADE;
Deleting one of tables the error is a foreign key constraint fails. Dropping one of rows with link, get the error (errno: 150) as well. How to delete this tables without drop all database?
Thanks in advance.
-- This message may have been cut off and the rest will only be shown to members. To become a member, click here --