title: Redshift: Update or Insert each row in column with random data from another table
body: <pre class="lang-sql prettyprint-override"><code>update testdata.dataset1
     set abcd = (select abc 
                 from dataset2
                 order by random()
                 limit 1
                ) 
  </code></pre>
  
  <p>Doing this only makes one random entry from table <code>dataset2</code> is getting populated in all the rows of <code>dataset1</code> table.</p>
  
  <p>What I need is to generate each row with random entry from <code>dataset2</code> table to <code>dataset1</code> table.</p>
  
  <p>Notice: <code>dataset1</code> can be greater than <code>dataset2</code>.</p>