Checking SQL%ROWCOUNT After an UPDATE
DROP TABLEemployees_temp
CASCADE CONSTRAINTS PURGE;
CREATE TABLE employees_temp
AS
SELECT *
FROM employees;
BEGIN
UPDATE employees_temp
SET salary = salary * 1.05
WHERE salary < 5000;
dbms_output.Put_line('Updated '
||SQL%ROWCOUNT
||' salaries.');
END;
/
Output :-
Updated 49 salaries.
PL/SQL procedure successfully completed.
0 comments:
Post a Comment