Chris Vadnais wrote:
> Is there a way to set the values in a given column to a series of sequential 
> numbers?
> 
> For example, I have a Column called "qid" and 1002 rows. I would like to tell 
> SQL to set the values in "qid" to 1, 2, 3, 4, etc.
> all the way down to 1002. 

update mytable set qid =
    (select count(*) from mytable t2 where t2.rowid <= mytable.rowid);

Igor Tandetnik

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

Reply via email to