"Anish Enos Mathew" <[EMAIL PROTECTED]> writes:

> Igor, I know that it will show error when we try to insert a value which
> is already there in the database when that field is a primary key.  But
> I want to check it out and I don't want that number to be inserted into
> the database. I was asking about a method which finds this. I don't want
> to terminate the program and have other numbers in a loop to be inserted
> into the database.

Instead of using INSERT which will generate an error if the primary key is
already in use, you can use INSERT OR IGNORE to ignore the error and simply
not insert the new record.  If you wanted instead to replace the old record
with the new one, you could use INSERT OR REPLACE.

Derrell

Reply via email to