[snip] I could not do this... TABLE1 ID NAME price ----- -------- ------ 1 1stname 34 2 2ndname 0
TABLE2 date 1stname 2ndname ------- ------- ------- 20041023 23.5 12.3 As a result I want to get out raws something like this... 1 34 1stname 23.5 2 0 2ndname 12.3 What is the SQL syntax for this puzzle...?? Or is it possible? [/snip] Not the way you have your tables constructed. There is no relationship mechanism between the two tables where a basic JOIN can take place. '1stname' is data in one table and is a column in the other table. Does that make sense to you? If you formed the 2nd table like this ...(watch out for keywords, such as 'NAME' and 'date'...you'll want to use something else) date name price ------- ------- ------- 20041023 1stname 23.5 20041023 2ndname 12.3 ..you'd have something to hang your hat on. SELECT a.ID, a.price, a.NAME, b.price FROM TABLE1 a, TABLE2 b WHERE a.NAME = b.name -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]