Back to SQL Errors
SQL Error

1215

Cannot add foreign key constraint

What does this error mean?

Foreign key constraint cannot be created due to data type mismatch or missing referenced column.

How to fix 1215?

Ensure referenced column exists and has matching data type. Check that referenced column has index. Verify data integrity in both tables.

Related SQL Errors