salary_increased_20
Sun May 26 2024 17:42:10 GMT+0000 (Coordinated Universal Time)
Saved by
@signup
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;
/
content_copyCOPY
Comments