I want to check if a table contains an index.
My query didn`t compiled on MySql workbench. How can i test if on a table exists index to then drop only the index from it?
It would be something like that:
ALTER TABLE my_table DROP INDEX medicos_cpf
WHERE EXISTS (SELECT * FROM my_table WHERE INDEX = "medicos_cpf");