diff --git a/sqlite_utils/cli.py b/sqlite_utils/cli.py index a2ba312..d9c7728 100644 --- a/sqlite_utils/cli.py +++ b/sqlite_utils/cli.py @@ -2478,8 +2478,6 @@ def rows( if limit: sql += f" limit {limit}" if offset: - # SQLite requires a limit clause before offset - a negative limit - # means "no upper bound", so offset works without an explicit limit if not limit: sql += " limit -1" sql += f" offset {offset}" diff --git a/sqlite_utils/db.py b/sqlite_utils/db.py index 4c79ace..2dad298 100644 --- a/sqlite_utils/db.py +++ b/sqlite_utils/db.py @@ -3598,8 +3598,6 @@ class Table(Queryable): if limit is not None: limit_offset += f" limit {limit}" if offset is not None: - # SQLite requires a limit clause before offset - a negative limit - # means "no upper bound", so offset works without an explicit limit if limit is None: limit_offset += " limit -1" limit_offset += f" offset {offset}"