Is there a way to set the default value of a column to DateTime.Now in Sql Server?
DateTime.Now
Example:
table Event Id int (auto-increment) not null Des
Select Table Column Name where you want to get default value of Current date
ALTER TABLE [dbo].[Table_Name] ADD CONSTRAINT [Constraint_Name] DEFAULT (getdate()) FOR [Column_Name]
Alter Table Query
Alter TABLE [dbo].[Table_Name]( [PDate] [datetime] Default GetDate())