title: Nested Selects Or JOINS?
body: <p>This is a snippet from my stored Proc</p>
  
  <pre><code>SELECT  NULL AS StoryID
        , AlbumID
        , CAST(NULL as varchar) AS StoryTitle
        , AlbumName
        , (SELECT URL FROM AlbumPictures AS AlbumPictures_3 WHERE (AlbumID = Albums.AlbumID) AND (AlbumCover = 'True')) AS AlbumCover
        , Votes
        , CAST(NULL as Int) AS PictureId
        , 'albums' AS tableName
        , (SELECT NestedAlbums.AlbumID FROM NestedAlbums WHERE (AlbumID = Albums.AlbumID)) AS Flag
  INTO #Results2
  FROM Albums WHERE AlbumID IN (SELECT StringVal FROM funcListToTableInt(@whereAlbumID))
  </code></pre>
  
  <p>I have used nested selects in my Query above. I am curious to know whether <code>Nested Selects</code> are better than <code>LEFT/Right JOINS</code> OR should i use <code>JOINS</code>? </p>
  
  <p>Table Albums:</p>
  
  <p><img src="https://i.stack.imgur.com/Ighei.png" alt="enter image description here"></p>
  
  <p>Table NestedAlbums:</p>
  
  <p><img src="https://i.stack.imgur.com/1HoiF.png" alt="enter image description here"></p>