SQL产生随机字符串

declare @ID int
set @ID = 10000
while @ID < 20000
begin

 declare @location varchar(1000)
 declare   @i   int  
 set @location = ''
   set   @i=0  
   while   @i<1000  
   begin  
        set   @location = @location + char(33 + cast(ceiling(rand() * 80) as int))
  set @i = @i+1
   end  
 
  select @location
 
 Update ITA_Issue set [Description] = @location where IssueId=@ID

set @ID = @ID +1
end

原文地址:https://www.cnblogs.com/huqingyu/p/1304450.html