Learning SQL question 3


Hello, I am having some problems with question 3.
I even copy pasted the code to make sure I had no mistakes but this always comes up.

PS C:\Users\palom\lsqlthw> sqlite3 -echo ex3.db -init ex3.sql
– Loading resources from ex3.sql
Error: near line 1: UNIQUE constraint failed: person.id
Error: near line 4: UNIQUE constraint failed: pet.id
Error: near line 7: UNIQUE constraint failed: pet.id
SQLite version 3.22.0 2018-01-22 18:45:57

Thank you!


I was finally able to fix everything by reading other posts, but I am unable to erase my question, thank you!


Go ahead and leave your question up, and just post your solution so that other people can solve it. I’m guessing you had stale data around? Did you drop the tables or reset the .db file?