Just Code‎ > ‎

T SQL - stupid Password generator

posted Oct 15, 2010, 4:56 AM by Peter Henell
declare @co int
declare @pass varchar(10)
set @pass = ''
set @co = 0
while @co < 6
begin
    set @pass = @pass + char(abs(checksum(newid())) % 26 + ascii('a'))
    set @co = @co + 1
end    
select 'e' + @pass
Comments