Created
March 27, 2022 08:44
-
-
Save somendra007/aca5c177026b198c9d31490ecc1f7f02 to your computer and use it in GitHub Desktop.
Generate Password view in sql server
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
------------------------------------------------------------------ | |
CREATED BY : SOMENDRA PRATAP SINGH | |
PURPOSE : Generate random password | |
SELECT RandomPassword from generateRandomPassword | |
------------------------------------------------------------------ | |
*/ | |
CREATE VIEW generateRandomPassword | |
AS | |
SELECT CHAR((RAND() * 25) + 97) + CHAR((RAND() * 25) + 97) + CHAR((RAND() * 25) + 97) + CAST(CAST((RAND()*9999) AS INT) AS VARCHAR(4)) as RandomPassword; | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment