且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

T-SQL 查询返回不应该的项目

更新时间:2023-02-05 22:24:32

缺乏千分之一秒值的精度.试试.997".

It's the lack of precision in the thousandths of a second value. Try ".997" instead.

MSDN DateTime 文档

运行这个,你会看到:

declare @dt datetime

select @dt = '2009-09-30 23:59:59.999'
select @dt