MySQL Forums
Forum List  »  Newbie

Select Rows to one Field
Posted by: Cory Lievers
Date: August 17, 2005 11:24AM

Hi there,

What I am trying to do is similar to the following (generic example to make my point/question): If you have a table "Movie" a table "Genres" and an in between table (MovieGenres) that allows multiple Genres to be linked to a specific Movie. How, through a select statement, could you get the Genres to come back as one field, comma-separated. Currently, just doing a join would return 4 rows (same generic movie info, but then a different genre per row).

Any ideas on how I could write a select statement to return only a single row, with the genres returned in one column/field?

Thanks so much.
Cory

Options: ReplyQuote


Subject
Written By
Posted
Select Rows to one Field
August 17, 2005 11:24AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.