On Thu, 24 Jan 2013 16:47:02 +1100 Richard Baron Penman <richar...@gmail.com> wrote:
> How to find which keys have been updated from this query? That's the problem with "limit N", right? It's not based on the data. Not only do you not know which rows were updated, you don't know which ones were *selected* except by inspection. If you want to process a subset of rows with status=0, a better approach is to use the primary key. If the key is a date, say, restrict the selection to a range of dates, perhaps a year or a month, and increment the range on each iteration. If you want to know which rows were updated regardless of the key, what you need is a column to hold a unique value for each update transaction, and set it as part of the UPDATE. You could add a datetime column, for example, if the time resolution is fine enough. HTH. --jkl _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users