Saya ingin pemicu ini dipecat setelah sebuah insert dibuat dengan teks married
pada marital_status
kolom, inilah yang saya miliki sejauh ini
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
sumber
BEGIN INSERT INTO [dbo].[applicant_marriage_info]([dom]) SELECT 'abc' FROM inserted WHERE marital_status = 'married' END