Add Datetime Default Value SQL
To create a table with default date time value, you will have to use getdate() as column default value. Be-careful while putting default value that column should not be not null by default. Please have sample create table script where I am keeping primary key incremental by default, column with varchar including date and datetime column.
- Sample insert statement to insert data to the table:
- I have inserted sample data which shows below: