title: SQL Server: table variable used in a inner join
body: <p>What is the problem with following SQL. <strong>Can table variable not be used in JOIN clause</strong>? </p>
  
  <p>Error msg is of "Msg 170, Level 15, State 1, Line 8 Line 8: Incorrect syntax near 't1'."</p>
  
  <pre><code>Declare @t TABLE (
      _SportName  varchar(50),
      _Lang       varchar(3)
  )
  
  insert @t VALUES('Basketball', 'ENG') -- ENG
  
  UPDATE tblSport t1 
  SET 
      t1.SportName = @t._SportName
  FROM 
      @t INNER JOIN tblSport ON (t1.Lang = @t._Lang)
  </code></pre>
  
  <p>Thanks.</p>