SQLite with skip (offset) only (not limit)

前端 未结 2 657
深忆病人
深忆病人 2020-12-16 10:36

I am trying to query a sql lite database with only an offset and no limit.

SELECT [Id], [Name], [IntValue], [IntNulableValue] FROM [Product] OFFSET 10


        
相关标签:
2条回答
  • 2020-12-16 11:02

    On the SQL as understood by SQLite page, you'll notice that OFFSET isn't understood without LIMIT.

    http://sqlite.org/lang_select.html

    According to the same documentation:

    If the LIMIT expression evaluates to a negative value, then there is no upper bound on the number of rows returned.

    0 讨论(0)
  • 2020-12-16 11:18

    Just set LIMIT to -1.

    For example:

    SELECT * FROM table LIMIT -1 OFFSET 10
    
    0 讨论(0)
提交回复
热议问题