I have 2 complex sql statements but they both have the same column name.
I am trying to do a union between both but the
UNION
says Incorrect syntex near UNION.
not sure if there is anything else necessary to make it work.
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.
The syntax that I usually use for unions is:
UNION ALLis more efficient thanUNION, since it doesn’t check for an eliminate duplicates.