title: Can a T-SQL variable represent an entire row?
body: <p>I'm coding for SQL Server 2008 R2. I have two databases that contains dozens of tables.</p>
  
  <p>Each table in one database contains a table with the same name in the other database.</p>
  
  <p>Tables with the same name have identical format (fields and data types). The contents of the two tables are similar but not identical. I need to update one based on changes made to the other, but only under certain circumstances. I think I want to use a cursor for this, but I can't find a good example to go by.  </p>
  
  <p>So far, the MSDN examples are reading one field at a time into a variable. I <em>do</em> need to be able to read/modify two columns which are identical in each table, but I gotta believe there's something less tedious than declaring variables for every column of every table.</p>
  
  <p>I would <em>like</em> to be able to FETCH an entire row, check a couple of columns and then make a decision of whether I want to write the entire row to the other table after changing two columns - but do I have to declare variables for EVERY field I want to fetch / write? There's no way to just FETCH an entire row and write an entire row?</p>