facing problem in appending table1 with the columns of table2
Table User (id, name, Gender)
Table Qualification(id, name)
many to many relationship
Lets Say User Table is as Below
id, name, gender
1, john, male
2, smith, male
3,catherine, female
Qualification Table
User_id, Degree
1, Msc
1,BSC
3,Msc
What i want is.. to get a resultant table as
id, name, gender, Degree
1,john,male,Msc
1,john,male,Msc
2,smith,male,null/or remains empty
3,catherine,female,Msc
What I have tried:
i've tried
Select u.id, u.name, u.gender, q.degree
FROM user as u
INNER JOIN qualification as q
ON u.id=q.User_id
I know em doing it wrong way.. :( but couldn't find any solution