I’m new to SQL and was reading on joins but i’m a bit confused so wanted help….
I have a table called student_sport which stores StudentID and SportID
I have another table which stores details of matches… so basically sportsID,MatchId,….
What i wanna do is…. for a perticular student display the sports in which matches have been played. ie. if a sportID exists in the second table only then display that when i check which sports the student plays.
The resultSet should contain only those sports for a student in which matches have been played….
Thanks
Then you have two tables :
You want: For one student all sport already played in a match
or use this other syntax (JOIN IN) (it makes complex queries easier to understand, so it’s good to learn)
ps: Includes Jan Hudec Coments, tx for it