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.id then to avoid duplicate.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With