If you don't have the permission to generate script according to an existing db, but you have the read permission for that db, if so you can use select to generate the expceted insert/delete/update statements, furtherly, you can also do complicated c…
Create Trigger [dbo].[upemployee_kefyu_sale] on [dbo].[employee] for update as if update(FullName) begin update erp.dbo.kefupp set erp.dbo.kefupp.saleperson =e.Fullname from [employee] e where e.typeid = erp.dbo.kefupp.etypeid update erp.dbo.salesper…
create trigger tr_aon afor insert,update,delere asbegin IF EXISTS(SELECT 1 FROM inserted) AND NOT EXISTS(SELECT 1 FROM deleted)BEGIN -- 插入触发. INSERT INTO B SELECT inserted.a FROM inserted;END; IF EXISTS(SELECT 1 FROM inserted) AND EXISTS(SELECT 1 FRO…