This is a discussion on Database View combining a many-to-many within the MySQL Database forums, part of the Database Forums category; I am wondering if the following is possible. I have 3 tables, one of which is merely a many-to-...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
I am wondering if the following is possible. I have 3 tables, one of
which is merely a many-to-many join table. I want to create a View that lists all of the primary records (players) with all of the related values (skills) under a single column-header. See below: Players ID Name Height 01 John 5'1" 02 Steve 5'2" Skills_CD ID Desc 01 Field Goals 02 Dribbling 03 Layups 04 Blocking 05 Defense Player_Skills Player_ID Skills_ID 01 01 01 02 01 05 02 03 02 04 I want a single SELECT statement that can be used as a View that will return the following: Name Height Skills John 5'1" Field Goals, Dribbling, Defense Steve 5'2" Layups, Blocking I would GREATLY appreciate any insight, even if it's someone telling me it's impossible! Thanks |
|
|||
|
On 30 Jan, 13:05, dean.jamie...@servicecanada.gc.ca wrote: > I am wondering if the following is possible. I have 3 tables, one of > which is merely a many-to-many join table. I want to create a View > that lists all of the primary records (players) with all of the > related values (skills) under a single column-header. See below: > > Players > ID Name Height > 01 John 5'1" > 02 Steve 5'2" > > Skills_CD > ID Desc > 01 Field Goals > 02 Dribbling > 03 Layups > 04 Blocking > 05 Defense > > Player_Skills > Player_ID Skills_ID > 01 01 > 01 02 > 01 05 > 02 03 > 02 04 > > I want a single SELECT statement that can be used as a View that will > return the following: > > Name Height Skills > John 5'1" Field Goals, Dribbling, Defense > Steve 5'2" Layups, Blocking > > I would GREATLY appreciate any insight, even if it's someone telling > me it's impossible! > > Thanks What you want is perfectly possible. Take a look at the GROUP_CONCAT function |