我希望married
在对marital_status
列上的文本进行插入后触发该触发器,这是我到目前为止的结果
ALTER TRIGGER [dbo].[marriage]
ON [dbo].[applicant_personal_info]
AFTER INSERT
AS
BEGIN
-- SET NOCOUNT ON added to prevent extra result sets from
-- interfering with SELECT statements.
SET NOCOUNT ON;
IF (SELECT [marital_status] FROM inserted) = 'married'
BEGIN
INSERT INTO [dbo].[applicant_marriage_info]([dom])
VALUES('abc')
END
END