builder.Union() generates incorrect SQL on SQLite and Oracle #71
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
The
UNION
operator is unnecessarily enclosing the queries in parenthesis, and that's not supported by all databases (and AFAIK required by none).This code:
Produces:
However, without parenthesis, it's supported:
The same happens with subqueries (e.g.
.Count()
):This syntax is not supported by SQLite or Oracle; PGSQL, MSSQL and MySQL seem to work fine with or without parenthesis, but AFAIK they are not required.
SQL Fiddle