SQL Server function to return minimum date (January 1, 1753)

前端 未结 8 641
生来不讨喜
生来不讨喜 2021-02-01 11:43

I am looking for a SQL Server function to return the minimum value for datetime, namely January 1, 1753. I\'d rather not hardcode that date value into my script.

Does an

8条回答
  •  -上瘾入骨i
    2021-02-01 12:07

    It's not January 1, 1753 but select cast('' as datetime) wich reveals: 1900-01-01 00:00:00.000 gives the default value by SQL server. (Looks more uninitialized to me anyway)

提交回复
热议问题