On Tue, May 17, 2011 at 7:37 PM, Frank Chang <frank_chan...@hotmail.com> wrote: > Hi, I just ran this sqlite command to randomly delete 20% of the rows in a > 15000 row sqlite table. DELETE FROM TABLE > WHERE ROWID IN (SELECT ROWID FROM TABLE ORDER BY RANDOM() LIMIT 3000) > Now there are gaps in the rowid in the modified table. I was wondering > if it was possible to close the row id gaps and make them contiguous again. > If it possible to close the gaps, what would be the sqlite statements I would > have to run to close the rowid gaps ? Thank you.
If you didn't declare a rowid column then VACUUM will do this for you. Nico -- _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users