title: Using select statement with two tables
body: <p>I have two tables. One contains User and company relationship a show below </p>
  
  <p>User_company</p>
  
  <pre><code>UserId    CompanyId
    1           2
    2           1
    3           1
    4           2
  </code></pre>
  
  <p>Another table holds user information</p>
  
  <p>User</p>
  
  <pre><code>Id    Name    City
  1     Peter    LA
  2     Harry    SF
  3     John     NY
  4     Joe      CI
  </code></pre>
  
  <p>How do I make a statement which will give me All the users which are in company 1? Will something like </p>
  
  <pre><code>Select * from User where Id in (Select UserId from User_company where CompanyId = 1)
  </code></pre>
  
  <p>work?</p>