Hi I'm trying to create a trigger
the trigger avant will be to update the worker union number.
my table looks like this -
worker(id,salary,union )
I wont the trigger to take action after I will update a worker salary.
I did this but it don't work
HELP Plz..

CREATE OR REPLACE TRIGGER update_status AFTER UPDATE on worker of salary
FOR EACH ROW
BEGIN
update worker set union = 9;
END update_status;

Recommended Answers

All 3 Replies

you want to update the entire table each time any row is updated ?

you want to update the entire table each time any row is updated ?

no, only if I update someone salary I wont to update is UNION

simply put a where clause to your code.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.