Posted By

mynameisharry on 01/19/09


sql password random

Versions (?)

Who likes this?

1 person have marked this snippet as a favorite


Creating a random password using dictionary table

 / Published in: SQL

Create a random password using a Dictionary database table. Selects a random word, and then appends two random numbers to the end, creating passwords in the form of: foozling98 or laicism11

  1. SELECT Top 1 word + cast(cast((RAND() * 9)+1 AS int) AS varchar(3)) + cast(cast((RAND() * 9)+1 AS int) AS varchar(2)) AS Password FROM dictionary ORDER BY newid()

Report this snippet  

You need to login to post a comment.