On 12 Jun 2009, at 8:54am, galea...@korg.it wrote:

> I've got an int column containing a numeric sequence like
> 1,5,6,8,10... how can I perform an update in order to have 1,2,3,4,5?

In software.  Not by just using one SQL command.  The simplest  
repeatable way to do it in SQLite would be to create an empty clone of  
the table with an INTEGER AUTOINCREMENT column instead of the old  
column and use the SELECT form of the INSERT command to copy all the  
rows into there, then DROP the old table and rename the new table.   
This would be inefficient and would force the remaking of all indices  
for the table which might be very slow.

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

Reply via email to