Dev Corner

Software Developer’s Notepad

You can use the SQL implicit cursor to retrieve the number of rows, affected by SQL query: SQL%ROWCOUNT.

BEGIN
  UPDATE employee
     SET salary = salary * 1.1
   WHERE salary_range = 'middle';
  dbms_output.put_line('Number of affrected rows: ' || SQL%ROWCOUNT);
END;

Add A Comment

You must be logged in to post a comment.