Simon,
Of course the rowid is THE field to use to uniquely identify a row (for
edit, delete, etc...).
I am talking about some ranking a result set. The ranking can be used
for displaying (in HTML or a desktop GUI) or as source for insert/update
sql.
Of course in code you can have your own counter; what about writing a
simple sql in the shell tool or any sql editor (I use SqliteSpy).
There were lots of other questions about "re-assigning" the rowid to
"natural" numbers (1..n); a solution would be to assign the rank to a
field (another field, not the rowid).
See the reply from James for the problem and a sql solution:
http://www.schemamania.org/sql/#rank.rows
How can this be efficient??
I don't use mysql, but Tony writes it can apparently do something like:
SELECT @ROW:=@ROW+1 as ROW,* FROM table
Regards,
Gabriel
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users