Will Leshner <[EMAIL PROTECTED]> writes:

> Hi. I'm sorry if this is really basic, but I'm wondering if there is a way to
> query a table based on row number and not rowid. In other words, I'd like to
> be able to ask for row number 13 regardless of what its rowid might be. I'm
> happy to write my own function in C if anybody has any suggestions.

SELECT *
  FROM ( SELECT * FROM table_name ORDER BY ROWID LIMIT 13 )
  ORDER BY ROWID DESC
  LIMIT 1;

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to