On Mon, Sep 14, 2009 at 01:25:29AM -0700, yogibabu scratched on the wall:
> 
> 
> 
> Jean-Christophe Deschamps wrote:
> > 
> > Do you have a short example where "INSERT OR REPLACE INTO ..." can be 
> > shown to actually _delete_ rows?
> > Which query are you refering to?
> 
> 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

  The whole row is deleted.  The command is INSERT OR REPLACE, as in
  "INSERT OR (DELETE AND INSERT)", not "INSERT OR UPDATE".  And if you
  want to get real picky, it is actually a variation on "INSERT,
  DELETE ON CONFLICT." In other words, there are situations when an 
  INSERT OR REPLACE can end up DELETEing more than one existing row
  before it INSERTs the new row.

   -j

-- 
Jay A. Kreibich < J A Y  @  K R E I B I.C H >

"Our opponent is an alien starship packed with atomic bombs.  We have
 a protractor."   "I'll go home and see if I can scrounge up a ruler
 and a piece of string."  --from Anathem by Neal Stephenson
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to