title: How to combine two columns from different tables that has unequal row size
body: <p>I have two table that contains check-in-out logs of employees.First table just contains check-in data and second table contains just check-out data. The data comes from two different machine ,and sometimes check-in and check-out data wont matching. I mean there may be additional data for check-in or check-out tables. I couldnt combine these two columns that has unequal sized rows from different different tables with an employee id ,and i dont know even is that operation possible(i am beginner at SQL).</p>
  
  <p>The purpose is that i want to pull all data at once. Of course i can pull the data respectively to the machine or table.</p>
  
  <p>When i try something like left join,inner join or full join it just holds first table's first element for each element of second table's data and then it keeps doing for second element of first table it is going like that. I think thats because of unequal row size of two column.</p>
  
  <pre><code>SELECT col1,col2
  FROM table1 as t1 LEFT JOIN
       table2 as t2
       ON t1.id = t2.id
  WHERE t1.id = 4 AND t2.id = 4 
  </code></pre>
  
  <p>or</p>
  
  <pre><code>SELECT col1
  FROM table1
  WHERE id = 4 IN (SELECT col2 FROM table2 WHERE id= 4)
  </code></pre>
  
  <p>id = 4 suits for my id it may between 1 to 30.</p>