Hi, this should be very simple, but yet I can't do it as a newbie:
Here are tables:
#1: Roster
user_id
first_name
#2: Roster_Seminar (junction table)
RS_ID
user_id (foreign key)
seminar_id(foreign key)
#3: Seminars
seminar_id
seminar_name
Sorry, originally the formatting looked right to me but on posting became messed up.
So basically I want to see what seminars John is attending.
Do I need to use an inner join to accomplish this? I'm not sure how to query a many to many table; the link/junction table is what is tripping me up.
Here is what I have:
SELECT first_name, seminar_name FROM Roster INNER JOIN Roster_seminar
ON Roster.user_id = Roster_Seminar.user_id INNER JOIN Seminars ON Roster_Seminar.seminar_id = Seminars.seminar_id;
Thanks!