sql - Error Code: 1452. Cannot add or update a child row: -



sql - Error Code: 1452. Cannot add or update a child row: -

a foreign key constraint fails (ldatabase.book, constraint bpid foreign key (bpid) references publish (pid) on delete no action on update no action) insert ldatabase.book (bid, title, author, bpid, available, language) values (20, 'dsp', 'kevin', 01, 10, 'eng')

i have created tables , inserted values publish table.. when trying come in values book table .. due misfortune have encountered error

posted error indicates that, column bpid in table ldatabase.book has foreign key relationship publish table pid column.

which means, before insert bpid key in book table create sure same key (pid) exists in publish table else end above posted error.

sql

Comments

Popular posts from this blog

php - How to pass multiple values from url -

xslt - DocBook 5 to PDF transform failing with error: "fo:flow" is missing child elements. Required content model: marker* -

database - php search bar when I press submit with nothing in the search bar it shows all the data -