Generate repeatable test data with a fixed RAND seed or row-number hashes, then verify identical names and amounts across runs.
SQL SERVER – Techniques for Retrieving Random Rows
This post will explore various techniques to retrieve random rows in SQL Server and analyze their performance and randomness characteristics in depth.
SQL SERVER – Selecting Random n Rows from a Table
To select random-looking n Rows, I can sort by NEWID and use TOP. A developer wanted ten AdventureWorks Product rows.
SQL SERVER – Generating Fixed Width OTP Values with Cryptographic Randomness
A Random Function for a six-digit code needs suitable randomness and deliberate formatting. A reader wanted codes for new app registrations.
Random Password Procedure in SQL Server with CRYPT_GEN_RANDOM
A random password procedure for SQL Server should use CRYPT_GEN_RANDOM, skip lookalike characters and guarantee every kind of character. This post builds one with a length and character switches, then tests 1,000 passwords. It also covers errors and safe handling.
Generate a Random Password in SQL Server Using T-SQL
To generate a random password in T-SQL, draw bytes from CRYPT_GEN_RANDOM, pick characters from a safe pool and shuffle them. This post builds one procedure that guarantees upper case, lower case, a digit and a symbol, skips look-alike characters, and proves it on 1,000 passwords. It also explains why ABS(CHECKSUM(NEWID())) can fail with an overflow error.
How to Generate Random Password in SQL Server? – Interview Question of the Week #181
Question: How to Generate Random Password in SQL Server?
Answer: This is a fantastic question and here is the script to generate a random password in SQL Server







