title: Update using select query with multiple Rows in Oracle
body: <p>Can any one please help me to solve this issue  </p>
  
  <p>Table Name:RW_LN  </p>
  
  <pre><code>  LN_ID      RE_LN_ID     RE_PR_ID   
    LN001        RN001       RN002
    LN002        RN002       RN003
    LN003        RN003       RN001  
    LN004        RN001       RN002   
  </code></pre>
  
  <p>MY Update Query is:   </p>
  
  <pre><code>update table RW_LN set RE_LN_ID=(
      select LN_ID
      from RW_LN as n1,RW_LN as n2
      where n1.RE_LN_ID = n2.RE_PR_ID)      
  </code></pre>
  
  <p>MY Expected Result is:   </p>
  
  <pre><code>     LN_ID           RE_LN_ID  
       LN001            LN003  
       LN002            LN004  
       LN003            LN002  
       LN004            LN003  
  </code></pre>
  
  <p>This above query shows error as <code>SUB QUERY RETURNS MULTIPLE ROWS</code>.Can any one provide the solution for this, I am Beginner in Oracle 9i.So Stuck in the logic  </p>