title: UPDATE local MSSQL table from Identical MySQL Linked Server Table Where Clause
body: <p>I have two tables both named employer. One table resides on a MSSQL the other on a MySQL. The MySQL DB has been Linked. </p>
  
  <p>I'm trying to update all rows in the MSSQL DB table with the data from the MySQL DB where the data is different. </p>
  
  <p>Ideally, because there's so many rows, I would prefer to only UPDATE the rows that have different data.</p>
  
  <p>Each DB Table has 2 Columns idemployees and employeescol1.</p>
  
  <p>Below is a working sample of a script that will update ALL the rows from the Linked MySQL DB:</p>
  
  <pre><code>UPDATE MSSQLDB.dbo.employer
  SET employeescol1 = emp2.employeescol1  
  FROM OPENQUERY(LinkedServer, 'SELECT * FROM employees') as emp2  
  WHERE
     MSSQLDB.dbo.employer.idemployees = emp2.idemployee
  </code></pre>
  
  <p>How do I add a WHERE clause to say something like WHERE employeescol >= (insert variable)???</p>