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

posted on   yhb199  阅读(169)  评论(0编辑  收藏  举报
努力加载评论中...

点击右上角即可分享
微信分享提示