|
3#
楼主 |
发表于 2004-7-8 00:22:00
|
只看该作者
非常感谢亚罗版主,原来我把inserted表和deleted表搞错了,真是非常感谢.ALTER TRIGGER 借用单编号_T1
ON dbo.[tbl借用单-编号]
FOR DELETE/* INSERT, UPDATE, DELETE */
AS
update dbo.[tbl交检单-编号]
set 借用=0,
借用日期=null
where 产品编号 in (select 产品编号 from deleted ) and 产品型号 in (select 产品型号 from deleted ) '====================ALTER TRIGGER 借用单编号_T1
ON dbo.[tbl借用单-编号]
FOR DELETE /* INSERT, UPDATE, DELETE */
ASupdate dbo.[tbl交检单-编号]
set
借用=0,
借用日期=null
FROM dbo.[tbl交检单-编号] t1, deleted t2
where t1.产品编号=t2.产品编号 AND t1.产品型号=t2.产品型号 这两种写法都通过,亚罗朋友,在网络多用户环境使用,这两种写法都可以吗? |
|