Update trigger to be initiated, when there is any update on any column in dummytable other than ModifiedDate and UserModified column changes (update trigger should not consider the changes on ModifiedDate and UserModified columns)
- CREATE TABLE [dbo].[dummytable](
- [ID] [int] NOT NULL,
- [code] [varchar](50) NULL,
- [codevalue] [varchar](50) NULL,
- [codedescription] [varchar](50) NULL,
- [IsAdmin] [bit] NULL,
- [FirstName] [varchar](50) NULL,
- [LastName] [varchar](50) NULL,
- [createdUser] [int] NULL,
- [CreatedDate] [datetime] NULL,
- [UserModified] [int] NULL,
- [ModifiedDate] [datetime] NULL,
- PRIMARY KEY CLUSTERED
- (
- [ID] ASC
- )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
- ) ON [PRIMARY]
- GO