This is a snippet from my stored Proc
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))
I have used nested selects in my Query above. I am curious to know whether Nested Selects are better than LEFT/Right JOINS OR should i use JOINS?
Table Albums:

Table NestedAlbums:

In general writing this an explicit
OUTER JOINwould be better.SQL Server will probably need to add an Assert to the plan with the sub query version that verifies the sub query only returns at most one row (unless this is guaranteed by a unique index). This can limit the possible transformations available. See Scalar Subqueries for more about this.
Also (though not relevant to the example in your question as both sub queries are different) writing as an explicit
JOINallows you to use multiple columns from the joined table with one lookup whereas using separate similar subqueries would not (SQL Server has no logic to detect the common sub expressions).Edit:
Following discussion in comments something like
You may notice this still has a sub query in the
SELECTlist butCASE ... EXISTSwill be implemented efficiently as a semi join.At the moment your query assumes that at most one matching row per album will be returned from
AlbumPicturesand would error out if this assumption is not true. This changes the semantics in that no error will be returned and you would get multiple rows with the variousURLs. If you didn’t want that to happen you would need to define whichURLto use and add aGROUP BY