Hi Vincent,

On 11/21/07, Mitchell Vincent <[EMAIL PROTECTED]> wrote:
> 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..

Though I haven't used sqlite but apparently you must have stored NULL
once into the table and were storing it a second time which led to
this error because this violated the primary key constraint. You could
have COUNTed NULLs instead on ItemID using different values for other
relevant columns to use GROUP BY to check the data yourself and see
what was wrong.

--
Asif

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

Reply via email to