This is related to this question: Joining multiple tables results in duplicate rows
I have two tables that I am joining. They share a key. The person table has one name per primary key but the email table has multiple emails per personId. I want to only show the first email per person. Presently I get multiple rows per person because they have multiple emails. I am running SQL-Server 2005.
EDIT: This is T-SQL. First email is literally the first email row per person.
Edit 2: First email as I see it would be the first email row that shows up in the join as SQL works through the query. I does not matter which email shows up. Only that no more than one email shows up. I hope that makes it clearer.
Select Person.PersonName, Email.Email
left join on Person.ID=Email.PersonId;