Answers for "alter table add on delete cascade mysql"

1

alter table add on delete cascade mysql

ALTER TABLE TABLEName
drop CONSTRAINT FK_CONSTRAINTNAME;

ALTER TABLE TABLENAME
ADD CONSTRAINT FK_CONSTRAINTNAME
    FOREIGN KEY (FId)
    REFERENCES OTHERTABLE
        (Id)
    ON DELETE CASCADE ON UPDATE NO ACTION;
Posted by: Guest on July-16-2021
3

mysql drop table cascade

SET FOREIGN_KEY_CHECKS = 0;
drop table if exists <your_1st_table>;
drop table if exists <your_2nd_table>;
SET FOREIGN_KEY_CHECKS = 1;
Posted by: Guest on November-30-2020

Code answers related to "alter table add on delete cascade mysql"

Browse Popular Code Answers by Language