> On Sep 03, 2006 5:11 AM, Charles Yeomans wrote:
>
> Hmmm.  Is there some something like
>
> INSERT INTO Table1 (1, 'foo') IF NOT EXISTS (SELECT * FROM Table1
> WHERE Table1.keyField=1)
>
> available?

Is keyField A PRIMARY KEY? If yes, you can use the "ON CONFLICT"
clause when inserting rows to test if there is already one with same
key. Example:

INSERT OR IGNORE INTO Table1(1, 'foo')

The record is not inserted because there's already one.

To see what "ON CONFLIT" clauses you can use check:
http://www.sqlite.org/lang_conflict.html

Carlos

_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

Reply via email to