title: Having a lot of SQL query conditions
body: <p>I am updating remote MySQL database by comparing row by row from local MSSQL one. Idea was to do update in 3 steps:</p>
  
  <p>1: select all ID's from local and execute following query on remote:</p>
  
  <pre><code>delete from REMOTE_DATABASE.TABLE where ID not in 
  ( list of LOCAL_DATABASE.TABLE ID's linked by OR condition )
  </code></pre>
  
  <p>2: select ID's from LOCAL_DATABASE.TABLE that are not exist on remote and insert</p>
  
  <p>3: update rows that have both tables.</p>
  
  <p>My question is regarding first step: I have 50000+ products. I am working in C# and I could join all ID's in string but I was wondering can query with 50000 ID's linked by OR condition be executed? Is it a wrong approach?</p>