On Feb 19, 2012, at 4:59 PM, Jörgen Hägglund wrote: > INSERT INTO History VALUES ('c:\', 1) > UPDATE History SET Hits = Hits + 1 WHERE Path = 'c:\'
Short of a merge statement, which SQLite lacks, you will indeed need to use two statements. For example, you could turn your first insert statement into a conditional insert: begin transaction; insert or ignore into history ... update history set hits = hits + 1 where ... end transaction; _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users