I see this:

CREATE TABLE table1( id INTEGER PRIMARY KEY ON CONFLICT REPLACE, field1 TEXT
);

but I think that the table has to already have been created this way.

I found that in the docs: http://sqlite.org/lang_conflict.html

Would that help the OP?


On Sun, Sep 13, 2009 at 6:56 PM, Jean-Christophe Deschamps
<j...@q-e-d.org> wrote:
>
>
> ´¯¯¯
>>INSERT INTO 'mytable' (key, 'visitorcount', 'visitdate')
>>VALUES (123456789, 1, NOW())
>>ON DUPLICATE KEY UPDATE 'visitorcount' = 'visitorcount' + 1
>>
>>the key statement being: ON DUPLICATE KEY UPDATE
>>
>>not tested but it seems like that is what you are looking for.  Its
>>sometimes refered to "upsert" processing...
> `---
>
> Is this _really_ a SQLite syntax?
>
>
>
> _______________________________________________
> sqlite-users mailing list
> sqlite-users@sqlite.org
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to