摘要:
在SQL Server我们一般使用GETDATE()来取得日期的信息,转成Varchar时会丢掉毫秒。其实在SQL Server中还有很多函数可以取得日期信息:SELECT SYSDATETIME() AS SYSDATETIME,SYSDATETIMEOFFSET() AS SYSDATETIMEOFFSET,SYSUTCDATETIME() AS SYSUTCDATETIME,CURRENT_TIMESTAMP AS CURRENTTIMESTAMP,GETDATE() AS GETDATE,GETUTCDATE() AS GETUTCDATE;查询结果如下:SYSDATETIME:201 阅读全文