NULL Values Involved in Arithmetic Operations in SQL Server

Q

What Happens If NULL Values Are Involved in Arithmetic Operations in SQL Server Transact-SQL?

✍: FYIcenter.com

A

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

SELECT 7+NULL;
GO
-----------
NULL

SELECT 10.02*NULL;
GO
-----------
NULL

SELECT 4.988E+10/NULL;
GO
-----------
NULL

 

Working with NULL Values in SQL Server Transact-SQL

⇒⇒SQL Server Transact-SQL Tutorials

2017-02-05, 286👍, 0💬