SQL2008触发器遇到“无法绑定由多个部分组成的标识符”问题
USE[ZZHdb]GO/******Object:Trigger[dbo].[trigger_t1]ScriptDate:06/06/201300:07:19*****...
USE [ZZHdb]
GO
/****** Object: Trigger [dbo].[trigger_t1] Script Date: 06/06/2013 00:07:19 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
ALTER TRIGGER [dbo].[trigger_t1]
ON [dbo].[Student]
after update
AS begin
select'学生表中'+d.Sno+'被修改了' from deleted d,inserted i
update Student SET Sno=i.Sno,Sname=i.Sname,Ssex=i.Ssex,Sage=i.Sage,Sdept=i.Sdept where Sno=d.Sno
end;
消息 4104,级别 16,状态 1,过程 trigger_t1,第 6 行
无法绑定由多个部分组成的标识符 "i.Sno"。
当然,Sno=i.Sno,Sname=i.Sname,Ssex=i.Ssex,Sage=i.Sage,Sdept=i.Sdept 这些也都遇到这样的问题 展开
GO
/****** Object: Trigger [dbo].[trigger_t1] Script Date: 06/06/2013 00:07:19 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
ALTER TRIGGER [dbo].[trigger_t1]
ON [dbo].[Student]
after update
AS begin
select'学生表中'+d.Sno+'被修改了' from deleted d,inserted i
update Student SET Sno=i.Sno,Sname=i.Sname,Ssex=i.Ssex,Sage=i.Sage,Sdept=i.Sdept where Sno=d.Sno
end;
消息 4104,级别 16,状态 1,过程 trigger_t1,第 6 行
无法绑定由多个部分组成的标识符 "i.Sno"。
当然,Sno=i.Sno,Sname=i.Sname,Ssex=i.Ssex,Sage=i.Sage,Sdept=i.Sdept 这些也都遇到这样的问题 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询