[EMAIL PROTECTED] wrote:
I cannot guarantee that this will always be tree.  But
it has always been true for SQLite version 3 and has been
true for SQLite version 2 since like version 2.2.0.  And
I cannot think of a reason that it might change.

There seems to be a SQL standard construct that would
do what I need in case my assumption becomes invalid:
http://troels.arvin.dk/db/rdbms/#select-limit

SELECT * FROM (
  SELECT
    ROW_NUMBER() OVER (ORDER BY key ASC) AS rownumber,
    columns
  FROM tablename
) AS foo
WHERE rownumber <= n

It seems that the sql ROW_NUMBER() is pretty much
the same as the ROWID in sqlite....

Though, I must say, that the syntax of the ROW_NUMBER() OVER
seems a bit strange....


Michael

Reply via email to