Does this only work with an identity column?
my :
INSERT INTO [Contacts].[ekr].[Usrs]([id], [Uid], [Pw], [writ], [Maint])
VALUES(7, 'MM', 'WW', 1, 0)
IF @.@.ERROR > 0
RAISERROR('String, Severity level, State',16,122)
ELSE
SELECT @.@.Identity as NewOne
Returns : NewOne
NULLYes. See the BOL entry on @.@.Identity.
Regards,
hmscott
Does this only work with an identity column?
my :
INSERT INTO [Contacts].[ekr].[Usrs]([id], [Uid], [Pw], [writ], [Maint])
VALUES(7, 'MM', 'WW', 1, 0)
IF @.@.ERROR > 0
RAISERROR('String, Severity level, State',16,122)
ELSE
SELECT @.@.Identity as NewOne
Returns : NewOne
NULL
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment