sqlite-viewer icon indicating copy to clipboard operation
sqlite-viewer copied to clipboard

Cannot paginate SQL query with sub-SELECT.

Open MikuAuahDark opened this issue 1 year ago • 0 comments

Consider this query:

SELECT * FROM foo WHERE bar_id IN (SELECT id FROM bar) LIMIT 0,30

The paginator will try to find the count by running SELECT COUNT(*) AS count FROM bar). Note the trailing closing parenthesis and the wrong table. This result in the pagination no longer works due to SQL syntax error.

MikuAuahDark avatar May 23 '24 04:05 MikuAuahDark