# \[MySQL\] alter table FK

**URL:** <https://forum.kirupa.com/t/mysql-alter-table-fk/217441>\
**Category:** programming\
**Created:** [February 27, 2007, 12:19am UTC](https://forum.kirupa.com/t/mysql-alter-table-fk/217441 "2007-02-27T00:19:17Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![cokelatdesign](https://avatars.discourse-cdn.com/v4/letter/c/7c8e57/32.png) [@cokelatdesign](https://forum.kirupa.com/u/cokelatdesign)\
**Post date:** [February 27, 2007, 12:19am UTC](https://forum.kirupa.com/t/mysql-alter-table-fk/217441/1 "2007-02-27T00:19:17Z")

</div>

hi guys,  
I want to alter table to add FK in my table, but for some reason it’s not working  
the code that i’m using is below:

ALTER TABLE profile(  
add CONSTRAINT fk\_myID  
FOREIGN KEY (my\_id) REFERENCES account(my\_id);  
)
