DECLARE
threshold_salary NUMBER := &threshold_salary; -- You can change this value as needed
BEGIN
-- Using an implicit cursor to update the salary
UPDATE employee
SET sal = sal * 1.2
WHERE sal > threshold_salary;
-- Display the number of rows updated
DBMS_OUTPUT.PUT_LINE(SQL%ROWCOUNT || ' rows updated.');
END;
/
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter