What will be the value of @@IDENTITY in the last row?
DECLARE @Test TABLE(a INT IDENTITY(1,1), b TINYINT)
INSERT INTO @Test(b) VALUES(1)
INSERT INTO @Test(b) VALUES(256) --Error is generated here, arithmetic overflow
INSERT INTO @Test(b) VALUES(255)
SELECT @@IDENTITY
A. NULL
B. 2
C. 3
D. 1
Answer:[C]
Highlight to find out the answer.
Sunday, February 28, 2010
@@IDENTITY
at 10:59 PM
Labels: SQL Server, SQL Server Test, SQL Server Tip
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment