Answers

Question and Answer:

  Home  MS SQL Server

⟩ What Happens If NULL Values Are Involved in Datetime Operations?

If NULL values are involved in datetime operations, the result will be datetime NULL values. The following tutorial script shows you some good examples:

USE GlobalGuideLineDatabase;

GO

SELECT GETDATE()+NULL;

GO

-----------

NULL

SELECT DATEDIFF(DAY, GETDATE(), NULL);

GO

-----------

NULL

 142 views

More Questions for you: