Is there a way to set the default value of a column to DateTime.Now in Sql Server?
Example:
table Event
Id int (auto-increment) not null
Description nvarchar(50) not null
Date datetime not null
The line:
Insert into Event(Description) values('teste');
should insert a row and the Date value should be the current date.
Add a default constraint with the GETDATE() function as value.