I am doing an except query in SQL like this
Q1 EXCEPT Q2 EXCEPT Q3
Where Q1, Q2 and Q3 are sub-query.
I just want to know what will be its output, (Q1-Q2)-Q3 or Q1-(Q2-Q3)? and if 2nd, how to get 1st one as output?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
I don’t have an installation of DB2, but in PostgreSQL,
Q1 except Q2 except Q3appears to be interpolated as(Q1 except Q2) except Q3(note:generate_series(m,n)is a function found in PostgreSQL that generates a single column of integer values frommton(wherem<n, of course)):However, it’s best to use parentheses to make certain that the order of evaluation is how you want it.