Mysql Join with distinct values
===

Table Name : x

id name 
id  is primary key

1   xxxx
2   yyyy

Table name : y <br />
sno primary key
id foreign key
class

1 1 first <br />
2 1  second

OUTPUT  <br />
id <br />
xxxx first second

I do not want name to repeat for each row
     
 SELECT x.name, y.class from x,y  WHERE x.id = y.id

This query output as xxxx first and xxxx second

Thanks in advance



