简单的触发器问题(二次发贴了)
lx47 2003-09-29 03:14:01 CREATE TRIGGER del ON dbo.CreditInsurance
FOR DELETE
AS
delete from Gatheringprawn
where Gatheringprawn.insurecode = (select insurecode from deleted)
CreditInsurance 是财务总表,Gatheringprawn是流水帐表
我想在总表每一次被删除一条记录后,都把他对应的流水帐全部删除,
这个触发器老是报错,说(select insurecode from deleted)的返回值不止一条。
请高人指点一二。
报错:subquery returned more than 1 value
this is not permitted when the subquery fallows = <,<=,>=.>
or the subquery is uesed as an expression
我都试过好多种写法了,全都报同一个错