sqlserver 触发器 if update()可不可以多家参数
createtriggertrigger_aircondition_annalontb_roomforupdateasifupdate(AC1_temp)begindec...
create trigger trigger_aircondition_annal on tb_room
for update
as
if update(AC1_temp)
begin
declare @room1 varchar(6), @temp1 int
select @temp1=AC1_temp,@room1=RoomId from deleted
insert into tb_aircondition_annal(RoomId,Air1temp,Air1Time) select RoomId,@temp1 ,getdate() from inserted
end 展开
for update
as
if update(AC1_temp)
begin
declare @room1 varchar(6), @temp1 int
select @temp1=AC1_temp,@room1=RoomId from deleted
insert into tb_aircondition_annal(RoomId,Air1temp,Air1Time) select RoomId,@temp1 ,getdate() from inserted
end 展开
2013-12-11
展开全部
create trigger trigger_aircondition_annal on tb_room
for update
as
declare @room1 varchar(6), @temp1 int
select @temp1=AC1_temp,@room1=RoomId from deleted
insert into tb_aircondition_annal(RoomId,Air1temp,Air1Time) select RoomId,@temp1 ,getdate() from inserted
for update
as
declare @room1 varchar(6), @temp1 int
select @temp1=AC1_temp,@room1=RoomId from deleted
insert into tb_aircondition_annal(RoomId,Air1temp,Air1Time) select RoomId,@temp1 ,getdate() from inserted
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
2013-12-11
展开全部
if update(AC1_temp) or update(AC2_temp) or ...
begin
end
begin
end
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询