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

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

mediawiki - How do I insert tables inside infoboxes on Wikia pages? -

Local Service User Logged into Windows -