Recently I learned how to use Stored Procedures in MS SQL. I really like this and all it took to get me going with procedures was to get one working example
and then some googling for more questions I had.
Now I would like to use my first Database Triggers and I would like to use the help of Experts Exchange to help me with that.
I would like to make sure that the field "last_modification_date" is always updated with GETDATE() whenever their is a INSERT or a UPDATE on the table.
Here is the current table:
CREATE TABLE [dbo].[SVCQuestionsForms](
[id] [int] IDENTITY(1,1) NOT NULL,
[folder_name] [varchar](100) NULL,
[description] [text] NULL,
[last_modified_by] [varchar](100) NULL,
[last_modified_date] [datetime] NULL,
CONSTRAINT [PK_SVCQuestionsForms] PRIMARY KEY CLUSTERED
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, FILLFACTOR = 80) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
How I would build this Trigger?