I wonder if there is a way to accomplish:
SELECT * FROM table
by using LIMIT and OFFSET like so:
Yes, it is possible by providing NULL:
SELECT * FROM tab LIMIT NULL OFFSET NULL
db<>fiddle PostgreSQL demo
7.6. LIMIT and OFFSET
LIMIT ALL is the same as omitting the LIMIT clause, as is LIMIT with a NULL argument.
Snowflake LIMIT / FETCH
The values NULL, empty string (''), and $$$$ are also accepted and are treated as “unlimited”; this is useful primarily for connectors and drivers (such as the JDBC driver) if they receive an incomplete parameter list when dynamically binding parameters to a statement.
SELECT * FROM demo1 ORDER BY i LIMIT NULL OFFSET NULL; SELECT * FROM demo1 ORDER BY i LIMIT '' OFFSET ''; SELECT * FROM demo1 ORDER BY i LIMIT $$$$ OFFSET $$$$;