Add default timestamp to db column

linkaiyi
Follow

Use Default Constraint>

ALTER TABLE YourTable ADD CONSTRAINT DF_YourTable DEFAULT GETDATE() FOR YourColumn

e.g.

ALTER TABLE confirm_data_update ADD CONSTRAINT DF_CREATED DEFAULT GETDATE() FOR created
Object has 0 attachments

Was this article helpful?

This article is viewed 49 times!

Recent Viewed Articles

Related Articles

0 Comments

Leave a Comment

Support