MySQL Forums
Forum List  »  Newbie

Re: Two Queries (sorted) Into One
Posted by: Rick James
Date: November 26, 2015 10:09PM

There is probably a precedence problem. Add some parentheses:

( SELECT ... ORDER BY ... LIMIT ... )
UNION ALL
( SELECT ... ORDER BY ... LIMIT ... )

Optionally, you can add another ORDER BY after the above stuff.

Options: ReplyQuote


Subject
Written By
Posted
November 04, 2015 06:06PM
Re: Two Queries (sorted) Into One
November 26, 2015 10:09PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.