Hi Christian, You can create a temporary table (see manual http://www.mysql.com/doc/C/R/CREATE_TABLE.html) with the same structure as prv or com and populate it with prv's and com's data by using INSERT INTO .... SELECT ... syntax (see manual http://www.mysql.com/doc/I/N/INSERT_SELECT.html)
Gurhan -----Original Message----- From: Christian [mailto:[EMAIL PROTECTED]] Sent: Friday, March 15, 2002 11:22 AM To: [EMAIL PROTECTED] Subject: joining 2 identical tables hi, i'm working on a project for managing used motorcycles. for security reasons i setup two identical tables. both with the same attributes. ID,UNIID,Manufacurer... one of the tables is named "Com" and the other "Prv". till now i used to search either "Com" or "Prv". but i want to look for a match in both of them and listing the result. i have tried anything i knew, but without luck. please can anyone tell me, how the SQL Statment must look like to get such an output? ------------------------------------- Com ------------------------------------- ID | UNIID | Manufacturer | ------------------------------------- 1 | 12D2 | Yamaha | 2 | 21E3 | test | ------------------------------------- Prv ------------------------------------- ID | UNIID | Manufacturer | ------------------------------------- 1 | 43I2 | Kawasaki | 2 | 68U2 | Something | ------------------------------------- output ???? ------------------------------------- ID | UNIID | Manufacturer | ------------------------------------- 1 | 43I2 | Kawasaki | 2 | 68U2 | Something | 1 | 12D2 | Yamaha | 2 | 21E3 | test | (Data of ID's equals, UNIID's are different, Manufacturer's are different.) many thanx in advance yours christian --------------------------------------------------------------------- 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 --------------------------------------------------------------------- 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