Examveda

Which clause is used to remove a foreign key constraint?

A. REMOVE

B. DELETE

C. DROP

D. EXCLUDE

Answer: Option C

Solution (By Examveda Team)

This question asks about removing a special rule called a foreign key constraint in a MySQL database.
Think of a foreign key constraint as a rule that says "This data can only exist if it's connected to something else in another table."

Let's look at the options:
A: REMOVE - This is not used for removing foreign key constraints.
B: DELETE - This is used to delete rows of data from a table, not constraints.
C: DROP - This is the correct answer! DROP is used to remove constraints like foreign keys.
D: EXCLUDE - This is not used to remove foreign key constraints.
So, to remove a foreign key constraint, you would use the DROP clause.

This Question Belongs to MySQL >> MySQL Miscellaneous

Join The Discussion

Related Questions on MySQL Miscellaneous