MySQL | Sololearn: Learn to code for FREE!

0

MySQL

How to destroy a foreign key constraint?

4/24/2022 1:08:57 AM

Zhilan Awat

2 Answers

New Answer

+3

-- Hope this link helps you SQL FOREIGN KEY Constraint https://www.w3schools.com/sql/sql_foreignkey.asp DROP a FOREIGN KEY Constraint To drop a FOREIGN KEY constraint, use the following SQL: MySQL: ALTER TABLE Orders DROP FOREIGN KEY FK_PersonOrder;

+1

Zhilan Awat try this 👇👇👇 ALTER TABLE TABLE_NAME DROP CONSTRAINT FOREIGN_KEY_NAME