Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pb with parenthesis #2

Open
ArnaudBegyn opened this issue Nov 22, 2023 · 3 comments
Open

Pb with parenthesis #2

ArnaudBegyn opened this issue Nov 22, 2023 · 3 comments

Comments

@ArnaudBegyn
Copy link

Parenthesis are not accepted. So it is not possible to use requests with parenthesis. For instance:
(SELECT Titre
FROM Film
WHERE duree)
UNION
(SELECT Titre
FROM Film
WHERE duree);

@Tchou
Copy link
Owner

Tchou commented Nov 22, 2023

I'll see what I can do, but the syntax is the one of Sqlite, so if the underlying library does not support parentheses, there is little I can do.
Note that it is ok to just write it without parentheses since UNION is non ambiguous here:

SELECT Titre FROM Film
UNION
SELECT Titre FROM Film

@ArnaudBegyn
Copy link
Author

@Tchou
Copy link
Owner

Tchou commented Nov 24, 2023

So after checking the standard, sqlite is right and parenthesis are not needed in union.
What example did you have in mind ? Note that you are not allowed to put ORDER BY clauses below union for instance (and they are useless).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants