MySQL与WHERE一起加入

FFi*_*ish 0 mysql sql t-sql

我有2个表,想要查询与艺术家联系的所有专辑数据

artists: artist_id | name

albums: album_id | artist_id | songs

这只给了我第一行

SELECT * FROM albums JOIN artists ON artists.artist_id = albums.artist_id
Run Code Online (Sandbox Code Playgroud)

我想指定一个专辑ID

SELECT * FROM albums 
   WHERE album_id = 101 
JOIN artists ON artists.artist_id = albums.artist_id
Run Code Online (Sandbox Code Playgroud)

Qua*_*noi 5

WHERE追求JOIN:

SELECT  *
FROM    albums
JOIN    artists
ON      artists.artist_id = albums.artist_id
WHERE   album_id = 101 
Run Code Online (Sandbox Code Playgroud)