You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is a side effect of partially implemented optional feature T301, “Functional dependencies” in combination with optimizations for OFFSET / FETCH clauses.
Some applications execute additional queries with FETCH FIRST 0 ROWS ONLY / LIMIT 0 / TOP 0 before actual execution of a query, so presence of this optimization is performance-critical. Because the SQL Standard explicitly forbids values less than 1 in <fetch first row count>, the whole such query is not compliant with the Standard, DBMS should throw data exception — invalid row count in fetch first clause exception. In our case we historically allow 0 here and this value means that an application or a user wants to perform basic syntax checks and get actual columns with data types returned by a query. Perhaps it should be documented somewhere.
With this schema:
The following query is semantically wrong, but executed nonetheless:
It produces an empty result set with column
A
. It should produce the same error as this query:I.e.:
The text was updated successfully, but these errors were encountered: