title: Not able to update multiple rows in Oracle at a time
body: <p>I am trying to execute an update query in a table where I am trying to insert foreign key for some table,</p>
  
  <p><strong>Query is:</strong></p>
  
  <pre><code>update TABLE_1 set TABLE_2_ID = (select TABLE_2_ID from TABLE_2)
  </code></pre>
  
  <p><strong>Getting Exception:</strong></p>
  
  <blockquote>
    <p>caused by : "ORA-01427: single-row subquery returns more than one row</p>
  </blockquote>
  
  <p>I have googled the problem I know the problem is I have multiple result rows from <strong>select TABLE_2_ID from TABLE_2</strong> which I am trying to update in a single row, but I have not been able to identify the result.</p>