On 8 Mar 2012, at 6:39pm, Marc L. Allen <[email protected]> wrote:

> What happens if the intermediate delete breaks a foreign key constraint?  And 
> does it happen if the insert restores the foreign key?

The constraint stops the DELETE, and the operation fails.  Just like you were 
worried about.  So instead of doing

INSERT OR REPLACE ...

you do

INSERT OR IGNORE ...
UPDATE ...

Simon.
_______________________________________________
sqlite-users mailing list
[email protected]
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to