Home >> FAQs/Tutorials >> SQL Server FAQ

SQL Server FAQ - NULL Values Involved in Arithmetic Operations

By: FYIcenter.com

(Continued from previous topic...)

What Happens If NULL Values Are Involved in Arithmetic Operations?

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

(Continued on next topic...)

  1. What Are NULL Values?
  2. How To Assign NULL Values to Variables or Columns?
  3. What Happens If NULL Values Are Involved in Arithmetic Operations?
  4. What Happens If NULL Values Are Involved in String Operations?
  5. What Happens If NULL Values Are Involved in Datetime Operations?
  6. What Happens If NULL Values Are Involved in Bitwise Operations?
  7. What Happens If NULL Values Are Involved in Comparison Operations?
  8. What Happens If NULL Values Are Involved in Boolean Operations?
  9. How To Test NULL Values Properly?
  10. How To Replace NULL Values in Expressions using ISNULL()?
  11. How To Replace Given Values with NULL using NULLIF()?

Related Articles:

More...


Other Tutorials/FAQs:

More...


Related Resources:

More...


Selected Jobs:

More...