title: MySql: return a list of Ids in a variable and reuse that variable in an IN CLAUSE
body: <p>Please see sample code</p>
  
  <pre><code>-- 1st select, getting AssetID from asset table
  SELECT GROUP_CONCAT(AssetID)
  INTO @AssetIDs
  FROM  asset;
  
  -- 2nd select, use @AssetIDs in an IN clause 
  SELECT AssetID
  from asset
  where AssetID IN (@AssetIDs)
  </code></pre>
  
  <p>From the 1st select, it returns 10 IDs and those IDs get stored in <code>@AssetIDs</code>
  So i would imagine <code>@AssetIDs = '1,2,3,4,5,6,7,8,9,10'</code></p>
  
  <p>However, the second <code>select</code> always return the first ID, 1.</p>
  
  <p>Can anyone help me find a way to select the list of IDs in a variable that reuse that variable in the IN clause?</p>