MySQL Forums
Forum List  »  Newbie

Re: UNION and ORDER BY problem
Posted by: laptop alias
Date: March 14, 2011 04:40PM

It's weird, isn't it?

Try adding a LIMIT clause to the second query...
SELECT * FROM comments ORDER BY rating DESC LIMIT 1
UNION
SELECT * FROM comments ORDER BY id DESC LIMIT 10000000

Options: ReplyQuote


Subject
Written By
Posted
March 14, 2011 01:51PM
Re: UNION and ORDER BY problem
March 14, 2011 04:40PM


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.