sql server触发器怎么设置
求在线解决触发器建于表voteDetailsCREATETRIGGERupdatevoteSumONdbo.voetDetailsFORUPDATEASbeginupda...
求在线解决
触发器建于表voteDetails
CREATE TRIGGER updatevoteSum ON dbo.voetDetails
FOR UPDATE
AS
begin
update voteMaster set voteSum=voteSum+1 where id=(select id from inserted)
end
如何建,求在线帮助 展开
触发器建于表voteDetails
CREATE TRIGGER updatevoteSum ON dbo.voetDetails
FOR UPDATE
AS
begin
update voteMaster set voteSum=voteSum+1 where id=(select id from inserted)
end
如何建,求在线帮助 展开
1个回答
展开全部
--SQL触发器语法参考
CreateTRIGGER trigger_name
ON { table | view }
[ WITH ENCRYPTION ]
{
{ { FOR |AFTER | INSTEAD OF } { [ Insert ] [ , ] [ Update ] }
[ WITH APPEND ]
[ NOT FOR REPLICATION ]
AS
[ { IF Update ( column )
[ { AND | or } Update ( column ) ]
[ ...n ]
| IF ( COLUMNS_UpdateD ( ) { bitwise_operator } updated_bitmask)
{ comparison_operator } column_bitmask [ ...n ]
} ]
sql_statement [ ...n ]
}
}
是否可以解决您的问题?
CreateTRIGGER trigger_name
ON { table | view }
[ WITH ENCRYPTION ]
{
{ { FOR |AFTER | INSTEAD OF } { [ Insert ] [ , ] [ Update ] }
[ WITH APPEND ]
[ NOT FOR REPLICATION ]
AS
[ { IF Update ( column )
[ { AND | or } Update ( column ) ]
[ ...n ]
| IF ( COLUMNS_UpdateD ( ) { bitwise_operator } updated_bitmask)
{ comparison_operator } column_bitmask [ ...n ]
} ]
sql_statement [ ...n ]
}
}
是否可以解决您的问题?
追问
不能><
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询