George Georgeus wrote: > Hi! > I do not know how to use INSERT and UNION together. > For example: > INSERT INTO tmp_table_name (a) > (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; It does not work. But I think it > should. Have the MySQL developers forgotten something?? > I use MySQL 4.012 > > ______________________________________________________________ > __________ Download Yahoo! Messenger now for a chance to win Live At > Knebworth DVDs http://www.yahoo.co.uk/robbiewilliams
For as far as I know (and the error in my console expresses), the UNION is not yet implemented in MySQL. This is not something the developers forgot, but something they left out on purpose (up till now, I've heard word that it's in development), to maintain the speed mysql is so proud of. Besides that, why don't you just use: > INSERT INTO tmp_table (a) > SELECT a FROM table_name WHERE (a=10 AND b=1) OR (a=11 AND b=2); Your example looks a bit odd, though .. What are you trying to do? -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]