title: Updating database records in a loop?
body: <pre><code>declare
  begin
    for i in (select * from emp)
    loop
      if i.sal=1300 then
        update emp
        set sal=13000;
      end if;
    end loop;
  end;
  </code></pre>
  
  <p>This code is updating all the records with salary 13000. <br>Instead i want to update records having salary 1300 to the value 13000. <br>Can you tell where I made a mistake?
  <br>I am accesing records using implicit cursor..
  <br>for every record i am checking the sal value of that record..
  <br>if salary value in a particular record is 1500 i want to update it to 15000..</p>