Table Name : x
id name
id is primary key
1 xxxx
2 yyyy
Table name : y
sno primary key
id foreign key
class
1 1 first
2 1 second
OUTPUT
id
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
Add in
GROUP BY y.idthen to avoid duplicate.