title: How to update for each records without looping in SQL Server
body: <p>I have a table and contained data show below, it's called TABLE_A</p>
  
  <pre>
  +++++++++++++++++++++++++++++++++++++++++++++
  PrimaryID | Col2           | SecondaryID
  +++++++++++++++++++++++++++++++++++++++++++++
  1         | Description 1  | 0
  2         | Description 2  | 0
  3         | Description 3  | 0
  4         | Description 4  | 0
  .         | ...            | .
  .         |
  .
  </pre>
  
  <p>please see <b>SecondaryID</b>, above. its has zero value as an initial value</p>
  
  <p>and I have another table, it's called TABLE_B, below</p>
  
  <pre>
  +++++++++++++++++++++++++++++++++++++++++++++
  PrimaryID | Col2           | ForeignKeyID
  +++++++++++++++++++++++++++++++++++++++++++++
  1         | Description 1  | 123
  2         | Description 2  | 320
  3         | Description 3  | 111
  4         | Description 4  | 999
  .         | ...            | .
  .         |
  .
  </pre>
  
  <p>I have trouble in SQL Server,
  How to update <b>SecondaryID</b> column on TABLE_A with <b>ForeignKeyID</b> value on TABLE_B for each row in TABLE_A's PrimaryID is equal TABLES_B's PrimaryID.
  But, I don't want to solve this problem using LOOPING CURSORS or another else.</p>
  
  <p>Are there a simple way??</p>
  
  <p>I need urgent, and thank you in advanced.</p>