I tried twice to post it but it seems it didn't find its way to the 
list. Sorry if ever it gets dupped.


Hi,


>insert or replace deletes all rows that weren't specified in the query

Do you have a short example where "INSERT OR REPLACE INTO ..." can be 
shown to actually _delete_ rows?
Which query are you refering to?


>i don't know maybe in combination with select there's possible to so 
>sth about
>it - like that:
>INSERT OR REPLACE INTO table (id).... then SELECT...

INSERT (or update) is a different beast from SELECT.  "Then" is 
unexpected in your statement.


 From what I understand, you might be happy with making your Id column 
Integer Primary Key (also look at autoincrement feature) then do a 
standard insert or replace.  But I can't say if this is suitable for 
your precise situation.

Also if SQLite is passed a null Id then it will generate the "next" 
available rowid for you. But then it's no more a one-liner since your 
application need to know which Id the newly inserted row has been 
given, typically with a query like Select 
<file:///C:/Program%20Files/SQLite3/sqlite-3_6_18-docs/c3ref/last_insert_rowid.html>sqlite3_last_insert_rowid()
 
.





_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to