I can't imagine the usefulness of this. The SQLite will have to run a query to find it, same as you need to, consider some standard sqlite code:

sqlite prepare
n=0
while sqlite_next=SQLITE_OK do {
  // do something with data
  inc(n)
}

The physical index of the row inside the query will always be given by n
If you want the physical index of the row in the database, simply get a 
non-ordered query ex:
  Select Id from t where 1
and check n for any returned Id.  (The "where 1" bit is superfluous I know, but 
only serves the explanation)

If you were thinking of having the rownum available as a quick reference id, like rowid, I can't see how this will be achieved wthout making another index out of it, something I personally wouldn't like to see. Also this will change with deletions etc, so will have high maintenance even in Index form.


On 2013/07/01 11:33, Tony Papadimitriou wrote:
Is there a function (or method), e.g., row(), to return the sequence number of the selected row? This is not the same as ROWID. row() should give a sequence number always starting from 1 up the to the number of rows returned by the view/select etc.

If not, then please add to the wish list.

TIA

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

Reply via email to