Mysql single query join 3 table and get all the results

前端 未结 3 1715
鱼传尺愫
鱼传尺愫 2021-01-23 02:44

Hi i want to list all the song for the album and i want to list all the artist for individual song see below for example.

1. Song Title 1
   - Artist 1, Artist 2,         


        
3条回答
  •  误落风尘
    2021-01-23 03:02

    Select s.song_name ,art.artist_name,a.album_name from Song
    join song_artist sa on sa.Song_id = s.Song_id
    join Album a on a.album_id = s.Album_id
    join Artist art on art.id = sa.artist_id
    

提交回复
热议问题