Modify Foreign Key
April 6th, 2009
To modify a Foreign Key in MySQL follow this steps :
1) Show table to see what is the name of Foreign Key we want to delete
SHOW CREATE TABLE table
2) Delete the Foreign Key
ALTER TABLE table DROP FOREIGN KEY table_ibfk_x
3) Create the new Foreign Key
ALTER TABLE table ADD CONSTRAINT `table_ibfk_x` FOREIGN KEY (`Field_id`) REFERENCES `references_table` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION
Hi, interesting post. I have been pondering this topic,so thanks for posting. I will likely be subscribing to your posts. Keep up the good posts
Great post! I’ll subscribe right now wth my feedreader software!
The article is usefull for me. I’ll be coming back to your blog.
Original post by Dmitri Gromov
You know so many interesting infomation. You might be very wise. I like such people. Don’t top writing.
Great post, thanks for sharing this with me
I look forward to reading your future posts!
Great Post, helped me out.