finding max possible date in ms sql server 2005+

前端 未结 7 1225
名媛妹妹
名媛妹妹 2021-01-01 08:22

Is there a function like GETDATE() in Sql Server 2005 that let\'s you get the max possible date?

I do not want to find the highest date in a table. I wa

7条回答
  •  南笙
    南笙 (楼主)
    2021-01-01 09:26

    If you truly want an expiration date of "never", it might be better to store NULL rather than an arbitrary far-future date. While it is unlikely that the date will reach year 9999 without the code being "fixed", it is an illogical value to store for EndDate = never.

提交回复
热议问题