Insert an “insertion date” value into a SQL table automatically?

前端 未结 5 1448
旧巷少年郎
旧巷少年郎 2021-01-24 11:49

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

5条回答
  •  迷失自我
    2021-01-24 12:29

    Very simple. When designing the table in SSMS, set the field's default value to getdate()

提交回复
热议问题