Create trigger yourTriggerName on SGQYB For Delete As Delete TBBSB where zzzbh in (Select zzzbh from deleted)
creat trigger T_deltable on sgqyb as delete table tbbsb where zzzbh=deleted.zzzbh go
creat trigger T_deltable on sgqyb for delete as delete table tbbsb where zzzbh=deleted.zzzbh go
create Trigger T_Del ON SGQYB FOR DELETE AS BEGIN Delete FROM TBBSB where zzzbh in (Select zzzbh from deleted) IF @@ERROR <>0 BEGIN RAISERROR ('删除失败!', 16, 1) ROLLBACK TRAN RETURN END END
Create trigger yourTriggerName on SGQYB For Delete As Delete TBBSB from deleted where zzzbh=deleted.zzzbh
CREATE TRIGGER 名3 ON dbo.SGQYB FOR delete AS delete TBBSB where ZZZBH in (select ZZZBH from deleted)
CREATE TRIGGER 名3 ON dbo.SGQYB FOR delete AS delete TBBSB where ZZZBH in (select ZZZBH from deleted)
在删除SGQYB里的ZZZBH时同时删除TBBSB里对应的字段ZZZBHcreate trigger t_delete on sgqyb for delete delete from tbbsb where zzzbh in(select zzzbh from deleted) go
For Delete
As
Delete TBBSB where zzzbh in (Select zzzbh from deleted)
as
delete table tbbsb where zzzbh=deleted.zzzbh
go
as
delete table tbbsb where zzzbh=deleted.zzzbh
go
FOR DELETE
AS
BEGIN
Delete FROM TBBSB where zzzbh in (Select zzzbh from deleted) IF @@ERROR <>0
BEGIN
RAISERROR ('删除失败!', 16, 1)
ROLLBACK TRAN
RETURN
END
END
For Delete
As
Delete TBBSB from deleted where zzzbh=deleted.zzzbh
CREATE TRIGGER 名3 ON dbo.SGQYB
FOR delete
AS
delete TBBSB where ZZZBH in (select ZZZBH from deleted)
CREATE TRIGGER 名3 ON dbo.SGQYB
FOR delete
AS
delete TBBSB where ZZZBH in (select ZZZBH from deleted)
for delete
delete from tbbsb where zzzbh in(select zzzbh from deleted)
go
CrazyFor(蚂蚁) ( ) 信誉:262
你们的语法是不是有问题!
怎么通不过?
FOR delete
AS
delete TBBSB where ZZZBH in (select ZZZBH from deleted)
FOR delete
AS
delete TBBSB where ZZZBH in (select ZZZBH from deleted)
FOR delete
AS
delete TBBSB from deleted where TBBSB.ZZZBH = deleted.ZZZBH