I just came to this very simple situation, when I needed to transfer the primary key to a specific value. Suppose the following table:
CREATE TABLE Test (
Id INTEGER PRIMARY KEY,
Desc TEXT);
Loaded with the following values:
INSERT INTO Test VALUES (0,'one');
INSERT INTO Test VALUES (1,'two');
If there is an attempt to update the primary key, it will of course fail:
UPDATE Test SET Id = Id+1;
Error: column id is not unique
Is there a way to pause integrity checking until an update request is completed?
source
share