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 in