Python Forum
FOREIGN KEY constraint failed
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
FOREIGN KEY constraint failed
#2
Insert the departments and the locations before the query to insert the employees and it will work. The queries fail because they use foreign IDs that don't exist yet in the database.
SalsaBeanDip likes this post
Reply


Messages In This Thread
FOREIGN KEY constraint failed - by SalsaBeanDip - Dec-04-2020, 12:48 AM
RE: FOREIGN KEY constraint failed - by Gribouillis - Dec-04-2020, 07:27 AM
RE: FOREIGN KEY constraint failed - by SalsaBeanDip - Dec-05-2020, 10:22 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  SQLite Unique constraint failed error djwilson0495 3 17,397 Aug-14-2020, 05:23 PM
Last Post: ndc85430
  length constraint on phrase hash to password javaben 0 2,582 Aug-21-2019, 05:34 PM
Last Post: javaben
  [split] create a virtual keyboard of an unknown foreign language with python fakoly 0 3,078 May-28-2018, 01:34 AM
Last Post: fakoly
  sqlite3 foreign key dsvinson 2 6,076 Mar-31-2018, 04:43 PM
Last Post: woooee

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020