declare @User_CodeV nvarchar(500) , @User_Pwd nvarchar(500) , @User_Name nvarchar(500) , @RndId nvarchar(500) ,@identity numeric(18,0) select @RndId =cast(ceiling(rand(checksum(newid()))*10000) as int) select @User_CodeV='BI_her2' , @User_Pwd=left( @User_CodeV, charindex('_',@User_CodeV)-1) +@RndId ,@User_Name=''
标签:RndId,CodeV,截取,MSSQL,select,User,随机数,nvarchar,500 From: https://www.cnblogs.com/panjinzhao/p/16649402.html