/ 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
Selects a random word, and then appends two random numbers to the end, creating passwords in the form of: foozling98 or laicism11
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
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()
Comments
