Random Password Generator

 

This is one of the methods to generate 8 characters password randomly (combination of alphabets,numbers and special characters)


declare @password varchar(8)

set @password=''

select @password=@password+char(n) from

(

select top 8 number as n from master..spt_values

where type='p' and number between 48 and 122

order by newid()

) as t

select @password

 

Published 20 November 2007 13:21 by Madhivanan

Comments

# Filling random passwords - Set based approach

27 March 2009 14:23 by Madhivanan

In this post , I showed a way to generate 8 character random password If you have table with data and

# Filling random passwords - Set based approach

30 March 2009 15:24 by SQL Server Transact-SQL (SSQA.net)

In this post , I showed a way to generate 8 characters random password If you have table with data and

# re: Random Password Generator

12 August 2009 11:33 by tonyrogerson

nice!