title: Can I use 'in' to update field instead of '=' in SQL oracle?
body: <p>I'm working on a project where I have to update multiple records in the same column. My values are stored in the list same as ID's that I have to use in my WHERE clause. I was wondering if I can use 'IN' instead of '=' and update all values from my list? Here is my code for lists:</p>
  
  <pre><code>&lt;cfset listUserNum = ArrayToList(userNum)&gt;
  &lt;cfset listUserCode = ArrayToList(userCode)&gt;
  </code></pre>
  
  <p>They look like this:</p>
  
  <pre><code>listUserNum = "72,15,71,27,16,14,22";
  listUserCode = "B,B,C,T,R,M,Y";
  </code></pre>
  
  <p>Here is my update statement:</p>
  
  <pre><code>&lt;cfquery name="UpdateUsers" datasource="test"&gt;
      Update Users
      Set UserCode in &lt;cfqueryparam value="#listUserCode#" cfsqltype="cf_sql_varchar" list="yes" /&gt; 
      Where UserNumber in &lt;cfqueryparam value="#listUserNum#" cfsqltype="cf_sql_integer" list="yes" /&gt; 
  &lt;/cfquery&gt;
  </code></pre>
  
  <p>I used 'IN' for my WHERE clause in the past but I never used in my SET. Let me know if I'm doing something wrong here or if there is better way to do this. I still haven't tried this because I have to update around 20k records and I want to make sure this is the best way before I run my update. Thank you!</p>