create trigger mytrigger on tbnoteNum for update as update tbnoteNum set State =1 from tbnoteNum where tbnoteNum.Last =0 create trigger mydeledte on dbo.tb_news --主动删除表 for delete as delete dbo.CasePic--被动删除表 from dbo.CasePic ca ,deleted d where ca.Picid=d.id create trigger mydeledte on dbo.tb_news --主动删除表 for delete as delete dbo.CasePic--被动删除表 from dbo.CasePic ca ,deleted d where ca.Picid=d.id