What will be the value of @A in the following statement?
SET ARITHABORT OFF
SET ANSI_WARNINGS OFF
DECLARE @A INT
SET @A = 2010/0
A. 0
B. NULL
C. Infinity
D. An error is generated.
Answer:[B]
Explanation: When both ARITHABORT and ANSI_WARNINGS set to OFF, SQL Server will return a NULL value in a calculation involving a divide-by-zero error.
Highlight to find out the answer.
Monday, February 15, 2010
Division by zero?
at 6:30 PM
Labels: SQL Server, SQL Server Test, SQL Server Tip
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment