can not select referenced columns mysql foreign key
today, i’m creating new database and i realize that i can’t select refernce column when create new foreign key. I try to read many question and it doesn’t help me to reslove it.
I try to run
MySql best practice suggestion required: Cannot delete or update a parent row: a foreign key constraint fails
I have mysql DB, with tables city, users and companies. Users have foerign key of City table (logic: users should have a city) and companies too have foreign key of city (logic: companies should be in any city).