Changing the output of Getdate

前端 未结 4 1557
谎友^
谎友^ 2020-12-11 15:57

Is it possible to deceive SQL Server to return a different date on GetDate() without actually changing the machine date?
This would be great, since we have

4条回答
  •  误落风尘
    2020-12-11 16:26

    You can always wrap GetDate() in a custom function and use that everywhere, although it's not an optimal solution.

提交回复
热议问题