Hi,
         MySQL has insert into function and sub select (mysql style) but I 
could not conclude these function togethter.

         If I want to select not existing row in 2 table, I used:

         SELECT table1.* FROM table1 LEFT JOIN table2 ON 
table1.id=table2.id where table2.id is null

then I'd like to insert the result row back into table2 by this SQL:

         insert into table2 SELECT table1.* FROM table1 LEFT JOIN table2 ON 
table1.id=table2.id where table2.id is null

         it got this error:
         ERROR 1066: Not unique table/alias: 'table2'

         How could I fixed this problem??

Sommai

----------------------------------------------------------
Please be informed that all e-mail which are addressing to
thaithanakit.co.th will need to be changed to
BTsecurities.com by March 1, 2002 Thank you. :-)
----------------------------------------------------------

---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to