-1

I've add a constraint on my table named cours a few days ago with mysql. the problem is that i want to delete the constraint and I don't remember the constraint's name I've used. When I want to delete the constraint they ask me to check if it exist

ALTER TABLE cours DROP FOREIGN KEY idEtudiant;

I expect my constraint to be removed but they say that is not exist

RiggsFolly
  • 93,638
  • 21
  • 103
  • 149
razzzer
  • 1
  • 1

1 Answers1

0

Maybe just find out what constraints do you have there?

SELECT DISTINCT(constraint_name) 
FROM information_schema.table_constraints 
WHERE constraint_schema = DATABASE() AND table_name = 'cours' AND constraint_name <> 'PRIMARY'
ORDER BY constraint_name ASC;