Answers for "mysql drop database cascade"

SQL
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
4

mysql delete database

DROP DATABASE dbname
Posted by: Guest on March-03-2020
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
1

mysql database drop

mysql -e "DROP DATABASE db_name;"
Posted by: Guest on September-08-2020

Code answers related to "SQL"

Browse Popular Code Answers by Language