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
Table creation Syntax can be like:
Create table api_key(api_key_id INT NOT NULL IDENTITY(1,1) PRIMARY KEY, date_added date DEFAULT GetDate());
Insertion query syntax can be like:
Insert into api_key values(GETDATE());