6
I need to edit a table, but I cannot remove it. I need to remove Foreign key, however, all commands I tried did not work.
I’m currently trying to
alter table tabela drop foreign key nomefk
And the error always happens by saying that there is no foreign key, but when I pull the describe, it exists and prevents me from modifying the table. Describing better what I will do, this table was originally a ratio 1 to N, but I analyzed the problem better and now turned N to N and so I need to remove this key to create it in the additional table.
Tried using the phpmyadmin?
– adventistaam
The FK is not in another table that references the one you want to edit?
– Camilo Santos
You can paste the database build sql and indicate the table name and Foreign you are trying to remove.
– Jorge Costa
tried that already:
alter table nome_tabela DROP COLUMN nomefk
– Lucas Pitas