title: What's wrong with such a Linq query
body: <p>I have two tables:</p>
  
  <pre><code>Team: teamId, teamName
  Player: playerId, teamId, playerName
  </code></pre>
  
  <p>I want to get the teamName through playerName. I wrote two querys, one of them doesn't work.</p>
  
  <pre><code>var query = from t in dc.Teams 
              where t.teamId == ((from p in dc.Players 
                                  where p.playerName == "kobe" 
                                  select p.teamId).SingleOrDefault()) 
              select t.teamName;  //Doesn't work
  
  var query = from t in dc.Teams 
              join p in dc.Players 
                  on t.teamId equals p.teamId 
              where p.playerName == "kobe" 
              select t.teamName;  //Works
  </code></pre>
  
  <p>Anyone can tell me why the first query couldn't work?</p>