我正在 SQL 服务器中编写一个 SP
ALTER PROCEDURE [dbo].[spAddUserBadge]
AS
BEGIN
INSERT INTO dbo.SE_UserBadge
(
[UID],
BadgeID,
BadgeAssignmentOrRenewalDate,
BadgeExpiryDate ,
AmountPaid,
Remarks ,
AssignedBy
)
VALUES
(
17,1, 12-12-2012, 12-12-2013, 0.00, '', ''
)
SELECT SCOPE_IDENTITY() AS id
END
GO
SCOPE_IDENTITY 为 NULL。我错在哪里?