Computed Column with Current DateTime?

前端 未结 2 1181
傲寒
傲寒 2021-01-20 01:22

I am trying to create a SQL Server 2008R2 Table column with automatically calculated current datetime for every row I insert.

I set Computed Column Specification valu

相关标签:
2条回答
  • 2021-01-20 01:28

    You can set the column's default value with the GETDATE(), with this you will get the current DateTime on every new row insert.

    0 讨论(0)
  • 2021-01-20 01:48

    Try setting GETDATE() to be the DEFAULT value for the column.

    0 讨论(0)
提交回复
热议问题