set ANSI_NULLS ON
set QUOTED_IDENTIFIER ON
go
ALTER TRIGGER [qiandaoTrigger]
ON [dbo].[bbsQianDao]
AFTER insert
AS
BEGIN
--SET NOCOUNT ON;
declare @uid int,@count int;
select @uid=uid from inserted
select @count=count(*) from inserted where [email protected] and hadreward=0
if(@count=2) --没有等于等于号(即==)
begin
update bbsUserReward set forumGold=forumGold+2 where [email protected]
update bbsQianDao set hadreward=1 where [email protected]
end
END
时间: 2024-10-14 00:37:27