Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Databases

Martin Batista
Martin Batista
4,606 Points

Not sure how to go about this code challenge.

SELECT Media.media_id, Genres.genre_id FROM Media,Genres WHERE Media_Genres.media_id=Media.media_id, Media_Genres.genre_id=Genres.genre_id;

Not sure if I have to use JOIN.

2 Answers

Steven Parker
Steven Parker
231,261 Points

A comma in the FROM clause is essentially a JOIN.

:point_right: But in a WHERE clause, when you test more than one condition you must combine them with "AND" instead of separating them with a comma.