At 10:17 am 14/08/03, Nils Valentin wrote:
The simple answer would be that the syntax says:
http://www.mysql.com/doc/en/UNION.html
SELECT... UNION... SELECT...
Further down the page it says
If you want to use an ORDER BY for the total UNION result, you should use parentheses:
(SELECT a FROM table_name WHERE a=10 AND B=1 ORDER BY a LIMIT 10) UNION (SELECT a FROM table_name WHERE a=11 AND B=2 ORDER BY a LIMIT 10) ORDER BY a;
Yup James,
Well spotted, thats the exeption which I meant. See that each SELECT statement has a ORDER BY clause attached, the single SELECTS as well as the final one ?
That seeems to be the only exception so far which I know off..
Sorry if this didn't came out so clear in my wordinbg in the last e-mail.
Best regards
Nils Valentin Tokyo/Japan
which is what I am doing.
The problem seems to be with the syntax of CREATE TABLE and INSERT INTO, not the syntax of UNION.
Jim
-- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]