title: SQL Server inner join
body: <p>How to choose main table when joining multiple tables using inner join?</p>
  
  <p>A) Should I choose main table depending on its number of columns/rows (For example large main as main table or to keep larger table as join table)?</p>
  
  <p>B) If I choose the table containing column that I use in where condition as main table ,   will there be any performance benefit ?</p>
  
  <p>For example lets say there are 2 tables. Table1 &amp; Table2 . Will there be any performance difference between two solutions given below </p>
  
  <p>Solution 1 :</p>
  
  <pre><code>select t1.empid , t1.name , t1.dept , t2.add , t2.city , t2.country
  from Table1 t1
  inner join Table2 t2 on t2.empid = t1.empid
  where t1.year = 2010
  </code></pre>
  
  <p>Solution 2 :</p>
  
  <pre><code>select t1.empid , t1.name , t1.dept , t2.add , t2.city , t2.country
  from Table2 t2
  inner join Table1 t1 on t1.empid = t2.empid 
  where t1.year = 2010
  </code></pre>