Search
 
SCRIPT & CODE EXAMPLE
 

SQL

integrity constraint violation: 1452 cannot add or update a child row: a foreign key constraint fails

It just simply means that the value for column project_id on table comments you are inserting doesn't exist on table projects. Bear in mind that the values of column project_id on table comments is dependent on the values of ID on table Projects.

The value 50dc845a-83e4-4db3-8705-5432ae7aaee3 you are inserting for column project_id does not exist on table projects.
Comment

ERROR 1452 (23000): Cannot add or update a child row: a foreign key constraint fails

Its Simple

Use user brain and eyes 
and check dose all data add into the patients table

Sp-  Don't trust your friends
Comment

PREVIOUS NEXT
Code Example
Sql :: MySql query execution order: 
Sql :: above average salary in sql 
Sql :: insert ip address in mysql 
Sql :: postgres advance auto increment 
Sql :: select indexname psql 
Sql :: create table 
Sql :: how to reset the identity column in sql server 
Sql :: drop unique 
Sql :: connectionString 
Sql :: sql round datetime 
Sql :: sql is not like 
Sql :: sql day from datetime 
Sql :: how to use join with 3 tables in sql server 
Sql :: how to modify alter user root@localhost identified with mysql_native_password by properly 
Sql :: mysql delete if not in another table 
Sql :: connect laravel to mysql on mac 
Sql :: sql is null or empty 
Sql :: update a column with another column in same table mysql 
Sql :: desc sql 
Sql :: stored procedure 
Sql :: merge in sql 
Sql :: sql check 
Sql :: can you write relational algebra into sql queries 
Sql :: specify regex check on column constraint sqlalchemy 
Sql :: TITLE: SQL Server principal "dbo" does not exist 
Sql :: oracle sql date winter time 
Sql :: sqlite referential integrity 
Sql :: hashpass 
Sql :: sql server: concatinate column value without trailing or leading comma 
Sql :: mysql search like but first exact match 
ADD CONTENT
Topic
Content
Source link
Name
5+4 =