27,580
社区成员
发帖
与我相关
我的任务
分享update BuyApply set Apply3='同意。'
,ApplyUserID3='1467',
ApplyUser3='51',
ApplyMobile3='138',
ApplyTime3=getdate()
where ApplyID='13'
在哪里?找不到[/quote]
不好意思,不用点击属性
点击表BuyApply, 然后右键,依赖关系,然后第二个选项(英文版为 Objects on which ... depends)ALTER TRIGGER [dbo].[BackBuyApply]
ON [dbo].[BuyApply]
AFTER DELETE,UPDATE
AS
BEGIN
-- SET NOCOUNT ON added to prevent extra result sets from
-- interfering with SELECT statements.
SET NOCOUNT ON;
-- Insert statements for trigger here
insert into [This_back].[dbo].[BuyApply]
select getdate() as backtime,*
from deleted
END[/quote]
一条记录如果更新两次, 你这里不是得插入两次, 这样是不是就重复了?
ALTER TRIGGER [dbo].[BackBuyApply]
ON [dbo].[BuyApply]
AFTER DELETE,UPDATE
AS
BEGIN
-- SET NOCOUNT ON added to prevent extra result sets from
-- interfering with SELECT statements.
SET NOCOUNT ON;
-- Insert statements for trigger here
insert into [This_back].[dbo].[BuyApply]
select getdate() as backtime,*
from deleted
END