I think I need some help with implementing a JOIN statement. I have a situation where I have 2 tables: "events" & "photos". Events has 2 fields: "eventID", "name" and photos has 3 fields: "photoID", "filename" and "eventID". I need to create a select statement that will return events.eventID for events that appear in the eventID column of the photos table. All the JOIN statements I've used return a result for every record in the photos table that has an eventID, so that a query gives me 20 instances of events.eventID for every photo that is in the photos table.
My goal is to create a list of events that have photos associated with them, but instead I'm getting the events for every photo in the table. How should I construct my SQL statement?