sqlserver添加数据的时候提示对象名‘update’无效
USE [XSCJ]
GO
/****** 对象: Trigger [dbo].[T1] 脚本日期: 04/10/2011 16:25:05 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
ALTER trigger [dbo].[T1] on [dbo].[COU] for insert,update as if(update(cno) and (exists (select cno from cou where cno = (select cno from updated))))
begin
print'11111'
end
而内存中只有存在deleted表和inserted表
如果要修改,先把要修改的记录放在deleted表里,然后再把修改后的记录放在inserted里才行。把这个触发器删除之后恢复正常。