Re: [sqlite] 'INTEGER PRIMARY KEY' start value

2014-10-19 Thread Luuk
On 19-10-2014 17:48, Keith Medcalf wrote: for a table test(i integer primary key, j integer) the new i (rowid) is as follows: test.i = case when test.i is not null then test.i else case max(test.i) when null then 1 else max(test.i)+1 end end if you add the autoincrement keyword, then the

Re: [sqlite] 'INTEGER PRIMARY KEY' start value

2014-10-19 Thread Keith Medcalf
ion commits. >-Original Message- >From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users- >boun...@sqlite.org] On Behalf Of Luuk >Sent: Sunday, 19 October, 2014 08:10 >To: sqlite-users@sqlite.org >Subject: Re: [sqlite] 'INTEGER PRIMARY KEY' start value > >

Re: [sqlite] 'INTEGER PRIMARY KEY' start value

2014-10-19 Thread Luuk
On 19-10-2014 15:27, Baruch Burstein wrote: Is the rowid/'INTEGER PRIMARY KEY' field that is not entered manually guaranteed to start from 1? Or at least from a positive number? no C:\temp>sqlite3 SQLite version 3.8.4.3 2014-04-03 16:53:12 Enter ".help" for usage hints. Connected to a

Re: [sqlite] 'INTEGER PRIMARY KEY' start value

2014-10-19 Thread Simon Slavin
On 19 Oct 2014, at 2:27pm, Baruch Burstein wrote: > Is the rowid/'INTEGER PRIMARY KEY' field that is not entered manually > guaranteed to start from 1? Or at least from a positive number? See the section 'Background' in for the

[sqlite] 'INTEGER PRIMARY KEY' start value

2014-10-19 Thread Baruch Burstein
Is the rowid/'INTEGER PRIMARY KEY' field that is not entered manually guaranteed to start from 1? Or at least from a positive number? -- ˙uʍop-ǝpısdn sı ɹoʇıuoɯ ɹnoʎ 'sıɥʇ pɐǝɹ uɐɔ noʎ ɟı ___ sqlite-users mailing list sqlite-users@sqlite.org