Skip to content

Problem adding values on table with FK #238

Closed Answered by lovasoa
Ajotah98 asked this question in Q&A
Discussion options

You must be logged in to vote

Hello !

This is a very clear and well-detailed issue report, thank you.

The answer to your question is in this page of the sqlite documentation: https://www.sqlite.org/foreignkeys.html

. Foreign key DML errors are reported if:

  • The parent table does not exist, or
  • The parent key columns named in the foreign key constraint do not exist, or
  • The parent key columns named in the foreign key constraint are not the primary key of the parent table and are not subject to a unique constraint using collating sequence specified in the CREATE TABLE, or
  • The child table references the primary key of the parent without specifying the primary key columns and the number of primary key columns in the parent…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@Ajotah98
Comment options

Answer selected by Ajotah98
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
sql Topic related to SQL, not specific to SQLPage
2 participants