What Happens If NULL Values Are Involved in Datetime Operations?
Submitted by: AdministratorIf 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
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
Top MS SQL Server Questions
☺ | What Are the Requirements on SQL Server Network Connections? |
☺ | How to create new table with "CREATE TABLE" statements? |
☺ | PHP MSSQL - How To Delete Existing Rows in a Table? |
☺ | How To Execute the Cursor Queries with "OPEN" Statements? |
☺ | What Happens If Strings Are Casted into Wrong Code Pages in MS SQL Server? |
Top Databases Programming Categories
☺ | RDBMS Interview Questions. |
☺ | SQL Interview Questions. |
☺ | SSRS Interview Questions. |
☺ | Database Administrator (DBA) Interview Questions. |
☺ | Sybase Interview Questions. |