Hello friends! I have been mindlessly stuck on a question for my class for about an hour now, and I was hoping to receive some insight on what I may be doing wrong. Here is the question:
Create a row trigger that displays the maximum salary in the EMPLOYEES table and is fired immediately before an employee’s salary is updated.
This is my code:
CREATE OR REPLACE TRIGGER max_sal_trigger
BEFORE UPDATE OF salary ON employees FOR EACH ROW
DECLARE
max_sal NUMBER;
BEGIN
SELECT max(salary) FROM employees INTO max_sal;
DBMS_OUTPUT.PUT_LINE('The Maximum salary is' || max_sal || '.');
END;
And here is my error: Error at line 4: PL/SQL: ORA-00933: SQL command not properly ended
Thank you so much in advance!
-Shaun