raiserror 的用法

if exists(select top 1 UserName from [dbo].[LJS_Test_User] where UserName=@UserName)
begin
	raiserror('用户名重复,不能添加!', 16, 1) ;
	return;
end

  

posted @ 2018-12-10 16:28  jasonlai2016  阅读(184)  评论(0编辑  收藏  举报