Hi Roger,
Many thanks for that, I think its close to what I'm looking for. However,
according to that document page the autoincr feature doesn't gaurantee
'sequential' numbers. Included in that page is the following:

Note that "monotonically increasing" does not imply that the ROWID always
increases by exactly one. One is the usual increment. However, if an insert
fails due to (for example) a uniqueness constraint, the ROWID of the failed
insertion attempt might not be reused on subsequent inserts, resulting in
gaps in the ROWID sequence. AUTOINCREMENT guarantees that automatically
chosen ROWIDs will be increasing but not that they will be sequential.

I need the values to be sequential.

Cheers,
Dave


Ward Analytics Ltd - information in motion
Tel: +44 (0) 118 9740191
Fax: +44 (0) 118 9740192
www: http://www.ward-analytics.com

Registered office address: The Oriel, Sydenham Road, Guildford, Surrey,
United Kingdom, GU1 3SR
Registered company number: 3917021 Registered in England and Wales.

-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of Roger Binns
Sent: 24 June 2014 21:07
To: General Discussion of SQLite Database
Subject: Re: [sqlite] Sequential numbers

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 24/06/14 13:02, Dave Wellman wrote:
> I have some rows in a table (not very many, typically less than 20) 
> and I want to generate a unique, sequential number for each row.

http://www.sqlite.org/autoinc.html

Roger
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1

iEYEARECAAYFAlOp2ncACgkQmOOfHg372QQ+YgCgqGwsFXwzNCxtAzefmzhM/go7
x7AAoIy/aOigXqBZlG/wP4tH5LZdCW6z
=1Xna
-----END PGP SIGNATURE-----
_______________________________________________
sqlite-users mailing list
[email protected]
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

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

Reply via email to