2
Answers

Create script of trigger

i want generate script trigger as bellow

i want generate script trigger as bellow

IF
NOT EXISTS (SELECT * FROM sys.triggers WHEREobject_id = OBJECT_ID(N'[dbo].[TriStockadjustmentDelete]'))EXEC
CREATE TRIGGER [dbo].[Sample]
ON [dbo].[customerTable]
AFTER delete
AS
BEGIN
.......
END '
dbo.sp_executesql @statement = N'
Using c sharp code my code uploaded

Attachment: scriptgenerate.zip

Answers (2)