You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
DS7/DSWeb/word/新协航_设计文档/数据库建表文档/20140215/删除许可证时,同时删除许可证使用触发器.sql

23 lines
363 B
MySQL

2 years ago
IF EXISTS (SELECT * FROM sys.triggers WHERE object_id = OBJECT_ID(N'[dbo].[tri_delApproval]'))
DROP TRIGGER [dbo].[tri_delApproval]
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
create trigger [dbo].[tri_delApproval]
on [dbo].[Import_Approval]
after delete
as
begin
delete from import_appstate where app_id in(select deleted.id from deleted)
end
GO