SQL Server???¥?????????
???????????? ???????[ 2015/6/11 11:16:11 ] ?????????????
USE suya_dev
GO
IF EXISTS(
SELECT *
FROM sys.triggers
WHERE name = N'BBS_Post_before_insert'
)
DROP TRIGGER BBS_Post_before_insert
GO
CREATE TRIGGER BBS_Post_before_insert
ON BBS_Post
FOR insert
AS
BEGIN
declare @Id int
declare @TopicId int
declare @Floor int
select @Id = Id from inserted
select @TopicId = TopicId from inserted
select @Floor = count(1) from BBS_Post where TopicId=@TopicId
update BBS_Post set Floor=@Floor where Id=@Id
END
GO
??????
???·???
??????????????????
2023/3/23 14:23:39???д?ò??????????
2023/3/22 16:17:39????????????????????Щ??
2022/6/14 16:14:27??????????????????????????
2021/10/18 15:37:44???????????????
2021/9/17 15:19:29???·???????·
2021/9/14 15:42:25?????????????
2021/5/28 17:25:47??????APP??????????
2021/5/8 17:01:11