Looking at the estimated execution plan for these they look the same, i think. Are there any differences?
And would anything be different if it were an right/left/full join?
I just want to make sure I'm joining things in the best poosible way.
Code:
Select * from Table1 T1 INNER JOIN Table2 T2 ON T1.ID=T2.T1ID WHERE T1.Field1=@var
Select * from (SELECT * From Table1 WHERE Field1=@var) AS T1 INNER JOIN Table2 T2 ON T1.ID=T2.T1ID
And would anything be different if it were an right/left/full join?
I just want to make sure I'm joining things in the best poosible way.