当我对表进行左连接时,当在右表中找到更多值时,它会复制左表的结果。即使右表上有多个值,我如何才能只返回左侧的不同值。(即使右表有多个图像,也只返回一部电影)
SELECT
*
FROM
Movie AS M
LEFT JOIN MovieImage AS MI WITH (
NOLOCK
) ON M.TheMovieDbId = MI.TheMovieDbId
WHERE
MI.ImageType = 'Poster'
AND MI.ImageSize = 'Thumb'
OR MI.ImageType IS NULL