Ragazzi io in greco non so dirlo.

La UNION si mangia gli ordinamenti
Ergo: quando funziona è un caso

Originariamente inviato da nicola75ss
Senza il limit mi vengono restituiti tutti i record in ordine crescente di id.
Aggiungendo il limit invece mi da i primi 3 in ordine crescente e tutti gli altri in ordine decrescente.
Mi pare che questo lo dimostri. O no??


Use of ORDER BY for individual SELECT statements implies nothing about the order in which the rows appear in the final result because UNION by default produces an unordered set of rows. If ORDER BY appears with LIMIT, it is used to determine the subset of the selected rows to retrieve for the SELECT, but does not necessarily affect the order of those rows in the final UNION result. If ORDER BY appears without LIMIT in a SELECT, it is optimized away because it will have no effect anyway.
http://dev.mysql.com/doc/refman/5.0/en/union.html