At 10:25 14/09/2009, you wrote:
´¯¯¯
>sorry, i meant "columns" not rows, whet i do insert command, specifying
>existing id and only some of the columns then the rest of the columns are
>deleted
>on the other hand, UPDATE command won't allow me to insert a new row

Then you can still do something along this:

CREATE TABLE "test" (
   "k" INTEGER PRIMARY KEY ON CONFLICT REPLACE,
   "a" CHAR,
   "b" CHAR);
insert or replace into test (k, a, b) values (234, 'abc', 'uvw');
insert or replace into test (k, a, b) values (123, 'def', 'xyz');

insert or replace into test (k, a, b) values (234, 'won', (select b 
from test where k = 234));

This is a possibility. There might be others.

>there should be a possibility to check id of the last affected row and
>return it to the code
`---

Yes but in a second statement that you have to issue when the key is a 
new one.



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

Reply via email to