Link to home
Start Free TrialLog in
Avatar of TonyReba
TonyRebaFlag for United States of America

asked on

Trigger Syntax MYSQL

What do I need to change or add to this trigger so updates the column department on table os_users ...

???
CREATE 
	
TRIGGER db_dhruniversity.`insert department`
	AFTER INSERT
	ON db_dhruniversity.jos_dhruprofile
	FOR EACH ROW
BEGIN
  UPDATE jos_users.department
  SET
    jos_users.department = jos_dhruprofile.department
  WHERE
    jos_dhruprofile.uid = jos_users.id  ;

END

Open in new window

Avatar of Sandeep Kothari
Sandeep Kothari
Flag of India image

Avatar of TonyReba

ASKER

do you see anything wrong on my syntax?
ASKER CERTIFIED SOLUTION
Avatar of jrm213jrm213
jrm213jrm213
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial