MySQL Forums
Forum List  »  Triggers

Re: Creating Trigger Using two Tables
Posted by: Peter Brawley
Date: May 29, 2012 09:53AM

You're vague on join criteria, but is this what you mean?

insert into table1
select table2.*
from table2 a
left join table1 b using (service,numbers,prefer)
where a.ops='A' and b.service is null;

delete table2
from table2 a
join table1 b using(service,numbers,prefer)
where a.ops='D';

PB

Options: ReplyQuote


Subject
Views
Written By
Posted
3177
May 29, 2012 01:03AM
Re: Creating Trigger Using two Tables
1403
May 29, 2012 09:53AM


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.