Hi Mitchell,

I don't know that resetting the primary key would be productive, since
rollover of INTEGER PRIMARY KEY would not occur anywhere even remotely
close to 15000.

Are you sure you aren't somehow attempting an insert of a key that has
already been used -- perhaps because of some race condition? 


-----Original Message-----
From: Mitchell Vincent [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, November 20, 2007 4:01 PM
To: sqlite-users@sqlite.org
Subject: [sqlite] Resetting a Primary Key

I have a primary key that auto increments and has apparently overlapped
back on to itself.

INSERT into mytable(id,name) values(NULL,'test');

.. is giving me "primary key must be unique" errors.

How can I reset the sequence for a primary key? The table only has about
15000 records in it and I've never seen this happen before..

--
- Mitchell Vincent

-----------------------------------------------------------------------------
To unsubscribe, send email to [EMAIL PROTECTED]
-----------------------------------------------------------------------------

Reply via email to