IF EXISTS (SELECT name FROM sys.objects WHERE TYPE = 'P' AND SCHEMA_NAME(schema_id) = 'dbo' AND name = 'Pr_hot_user_Update')
BEGIN
EXEC('DROP PROCEDURE [dbo].[Pr_hot_user_Update]')
END
GO
CREATE PROCEDURE [dbo].[Pr_hot_user_Update]
@userid BigInt,
@username NVarChar(100),
@registertime DateTime
AS
BEGIN
SET NOCOUNT ON
UPDATE [dbo].[hot_user] SET
[username] = @username,
[registertime] = @registertime
WHERE [userid] = @userid
IF @@ROWCOUNT = 0
BEGIN
RAISERROR('Concurrent update error. Updated aborted.', 16, 2)
END
SET NOCOUNT OFF
END