Kittiphum, Wednesday, December 04, 2002, 1:49:08 PM, you wrote: K> This query can find the record in Table1 that not found in Table2
K> SELECT Table1.ID FROM Table1 LEFT JOIN Table2 Using(ID) K> WHERE Table2.ID IS NULL K> and what query that use to delete the record in Table1 that not found K> in Table2 such as K> Delete from Table1 where Table1.ID in K> SELECT Table1.ID FROM Table1 LEFT JOIN Table2 Using(ID) K> WHERE Table2.ID IS NULL K> because of MySQL ver 3.23.XX not support sub select while we still K> use 3.23.XX In 3.23. you can't do it with single SQL statement. You can use programming language or use CONCAT() function as described here: http://www.mysql.com/doc/en/ANSI_diff_Sub-selects.html K> and one more question K> How to merge table with varchar type not char type (because if table K> contain varchar column we can't merge them but with table that only K> have char column it work) It works fine for me. If it doesn't work for you, please, provide some more info. -- For technical support contracts, goto https://order.mysql.com/?ref=ensita This email is sponsored by Ensita.net http://www.ensita.net/ __ ___ ___ ____ __ / |/ /_ __/ __/ __ \/ / Victoria Reznichenko / /|_/ / // /\ \/ /_/ / /__ [EMAIL PROTECTED] /_/ /_/\_, /___/\___\_\___/ MySQL AB / Ensita.net <___/ www.mysql.com --------------------------------------------------------------------- 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