MySQL Forums
Forum List  »  Triggers

Re: Triggers
Posted by: John Loeffler
Date: April 21, 2011 07:07PM

Hi Ronan:

I dummied up some data to match the table structure from the previous reply and the current trigger...

drop trigger if exists tsu_resp;
create trigger tsu_resp after update on respondent
for each row update job
set ts=current_timestamp and jobnum = new.jobnum;

insert into job values (101,'test','test','test',0);
insert into job values (102,'test','test','test',0);
insert into job values (103,'test','test','test',0);
insert into job values (104,'test','test','test',0);

insert into respondent values (4,4,4,104),(1,1,1,101),(2,2,2,102),(3,3,3,103);

update respondent set country_id = '12' where resp_id = 4;

select * from job;

Does this help?

Options: Reply• Quote


Subject
Views
Written By
Posted
3153
April 20, 2011 03:17PM
1244
April 20, 2011 04:51PM
1600
April 21, 2011 11:03AM
1182
April 21, 2011 01:17PM
1247
April 21, 2011 02:53PM
1162
April 21, 2011 05:16PM
Re: Triggers
1217
April 21, 2011 07:07PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.