Interviewer And Interviewee Guide

MS SQL Server Interview Question:

What Happens If NULL Values Are Involved in Datetime Operations?

Submitted by: Administrator
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

Submitted by: Administrator

Read Online MS SQL Server Job Interview Questions And Answers
Copyright 2007-2024 by Interview Questions Answers .ORG All Rights Reserved.
https://InterviewQuestionsAnswers.ORG.