Is there a way to define a datetime column and populate it automatically when a row is inserted, without having to use a trigger?
The value would be the point in time w
Yes, use a default
:
create table test_table (d_col datetime default current_timestamp)
create table FACT_LO ([LOAD_DATE] [datetime] default getdate())
Very simple. When designing the table in SSMS, set the field's default value to getdate()
Yes, use a default constraint of GetDate()
Yes use a default constraint:
mydatecolumn datetime
constraint DF_myDate DEFAULT (getdate())