SQL JOIN - WHERE clause vs. ON clause

前端 未结 19 1586
深忆病人
深忆病人 2020-11-21 11:56

After reading it, this is not a duplicate of Explicit vs Implicit SQL Joins. The answer may be related (or even the same) but the question is diffe

19条回答
  •  感情败类
    2020-11-21 12:54

    this is my solution.

    SELECT song_ID,songs.fullname, singers.fullname
    FROM music JOIN songs ON songs.ID = music.song_ID  
    JOIN singers ON singers.ID = music.singer_ID
    GROUP BY songs.fullname
    

    You must have the GROUP BY to get it to work.

    Hope this help.

提交回复
热议问题