Answer by Cyborg
Why do you want to do this with trigger? DEFAULT value will work. Assign default value getdate() for both columns, when you do inserts both columns will get the default value.
View ArticleAnswer by ecomma
EXEC sp_MSforeachtable 'IF NOT EXISTS (SELECT * FROM sys.triggers WHERE object_id = OBJECT_ID(N''?_Update_DateCreated_DateModified'')) EXEC dbo.sp_executesql @statement = N''CREATE TRIGGER...
View Article
More Pages to Explore .....