![Mysql: Error 1215 encountered when attempting to add a foreign key to a composite primary key using the alter command Mysql: Error 1215 encountered when attempting to add a foreign key to a composite primary key using the alter command](https://i.stack.imgur.com/hZF9d.jpg)
Mysql: Error 1215 encountered when attempting to add a foreign key to a composite primary key using the alter command
![SQL SERVER - 2008 - Creating Primary Key, Foreign Key and Default Constraint - SQL Authority with Pinal Dave SQL SERVER - 2008 - Creating Primary Key, Foreign Key and Default Constraint - SQL Authority with Pinal Dave](https://blog.sqlauthority.com/i/b/14_DFAllQuery.gif)
SQL SERVER - 2008 - Creating Primary Key, Foreign Key and Default Constraint - SQL Authority with Pinal Dave
![How to add Foreign key Constraint to existing table in SQL Server-SQL Server/TSQL Tutorial Part 68 - YouTube How to add Foreign key Constraint to existing table in SQL Server-SQL Server/TSQL Tutorial Part 68 - YouTube](https://i.ytimg.com/vi/AJ0RTqICzAY/maxresdefault.jpg)
How to add Foreign key Constraint to existing table in SQL Server-SQL Server/TSQL Tutorial Part 68 - YouTube
![Dropping and adding a foreign key - Databases - SitePoint Forums | Web Development & Design Community Dropping and adding a foreign key - Databases - SitePoint Forums | Web Development & Design Community](https://global.discourse-cdn.com/sitepoint/optimized/3X/b/b/bb2309b6797513fad85ffb9e9a910133b5f19de1_2_1024x576.png)
Dropping and adding a foreign key - Databases - SitePoint Forums | Web Development & Design Community
![SQL SERVER - 2008 - Creating Primary Key, Foreign Key and Default Constraint - SQL Authority with Pinal Dave SQL SERVER - 2008 - Creating Primary Key, Foreign Key and Default Constraint - SQL Authority with Pinal Dave](https://blog.sqlauthority.com/i/b/5_AllQuery.gif)