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
During a Health Check, a developer asked how to pick random n rows from a table instead of the TOP or BOTTOM rows. This is the simple query I shared with him.
SQL SERVER – Simple Method to Generate Fixed Digit OTP Code Using Random Function
A reader wanted a six digit OTP for app sign-ups. Here is a simple way to generate a fixed digit OTP code in SQL Server with the RAND() random function.
SQL SERVER – How to Generate Random Password? – Enhanced Version – Part 2
James Curran built on Tim Cartwright’s work to create a stored procedure that can generate random password strings with letters, digits and special characters.
SQL SERVER – How to Generate Random Password? – Enhanced Version
My earlier random password script was not complete. SQL Server expert Tim Cartwright sent an enhanced stored procedure that fixes my errors and adds useful options.
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




