Re: [sqlite] add constant to INTEGER PRIMARY KEY

2018-12-17 Thread James K. Lowden
On Thu, 13 Dec 2018 16:06:04 -0700 "Keith Medcalf" wrote: > You cannot do that. The PRIMARY KEY is required to be unique at each > "step" along the way, For the OP's benefit, this is longstanding, er, idiosyncrasy of SQLite. It does not conform to the SQL standard. The SQL rule is there

Re: [sqlite] add constant to INTEGER PRIMARY KEY

2018-12-13 Thread Simon Slavin
On 13 Dec 2018, at 10:39pm, Roman Fleysher wrote: > UPDATE table1 SET t = t + 8000; > > > Error: UNIQUE constraint failed: table1.t This means there's an actual example where one value for t is 8000 greater than another. Use a larger constant. Simon.

Re: [sqlite] add constant to INTEGER PRIMARY KEY

2018-12-13 Thread Roman Fleysher
pated traffic volume. >-Original Message- >From: sqlite-users [mailto:sqlite-users- >boun...@mailinglists.sqlite.org] On Behalf Of Roman Fleysher >Sent: Thursday, 13 December, 2018 15:39 >To: General Discussion of SQLite Database >Subject: [sqlite] add constant to INTEGER PR

Re: [sqlite] add constant to INTEGER PRIMARY KEY

2018-12-13 Thread Keith Medcalf
ginal Message- >From: sqlite-users [mailto:sqlite-users- >boun...@mailinglists.sqlite.org] On Behalf Of Roman Fleysher >Sent: Thursday, 13 December, 2018 15:39 >To: General Discussion of SQLite Database >Subject: [sqlite] add constant to INTEGER PRIMARY KEY > >Dear SQLiters,

[sqlite] add constant to INTEGER PRIMARY KEY

2018-12-13 Thread Roman Fleysher
Dear SQLiters, I would like to update a column declared as INTEGER PRIMARY KEY. This column is parent to a column of another table: table1 ( t INTEGER PRIMARY KEY NOT NULL); table2 (t INTEGER PRIMARY KEY NOT NULL REFERENCES table1(t) ON DELETE CASCADE ON UPDATE CASCADE); I keep PRAGMA