Anthony, Do you mean this (not tested)?
Select table1.id from table1 INNER JOIN table2 USING (id) INNER JOIN table3 USING (id) WHERE table1.cl1 = 1 and table1.cle2=5 AND table1.cl3 IN(1,2,5,8) AND table2.cl1 = 4 and table2.cle2 IN(10,12,81) AND table2.cl3 IN(3,7) AND table3.distance BETWEEN 1 and 99; HTH PB ----- Original Message ----- From: Anthony Ward To: [EMAIL PROTECTED] Sent: Thursday, June 05, 2003 1:17 PM Subject: Join question Hi, I have posted a similar question, but can't find the answers. I'm sorry. What i'm trying to do is that i have 3 tables each has three columns and are indexed. so I want to do something like select everything in 3 tables and display only similar id. Select id from table1 where table1.cl1 = 1 and table1.cle2=5 and table1.cl3 IN(1,2,5,8) Join Select id from table2 where table2.cl1 = 4 and table2.cle2IN(10,12,81) and table2.cl3 IN(3,7) Join Select id from table3 where table3.distance BETWEEN 1 and 99 where table1.id = table2.id=table3.id Any help is appreciated Anthony -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]