http://dev.mysql.com/doc/refman/5.0/en/union.html
SELECT 'teens',MIN(price) FROM teenage_products UNION SELECT 'kids',MIN(price) FROM child_products; SELECT id FROM teenage_products UNION ALL SELECT id FROM child_products;
NOT: Aşağıdaki sorguda ORDER BY yapmak istiyorsak alias kullanmamız şartmış.
(select f1, f2, f3 AS ff FROM t1) UNION (SELECT f2,f2,f3 FROM t2) ORDER BY ff;