title: MySQL variable format for a "NOT IN" list of values
body: <p>Going crazy trying to set a variable in a query of type:</p>
  
  <pre><code>SET @idcamposexcluidos='817,803,495';
  </code></pre>
  
  <p>so i can then use it on a </p>
  
  <pre><code>WHERE id_campo not in (@idcamposexcluidos)
  </code></pre>
  
  <p>I've tried defining the variable in different formats with no luck and don't seem to find an specific example for the above:</p>
  
  <pre><code>SET @idcamposexcluidos='(817,803,495)';
  ...
  WHERE id_campo not in @idcamposexcluidos
  
  
  SET @idcamposexcluidos=817,803,495;
  </code></pre>
  
  <p>with no success. It either returns an error or ignores the values.</p>