This month's discount Comprehensive Database Performance Health Check · Testimonials
SQLAuthority with Pinal Dave
Home
  • Consulting
    • Health Check
  • Free Videos
  • All Articles
    • AI
    • SQL Performance
    • SQL Tips and Tricks
    • Interview Questions and Answers
    • SQL Puzzle
    • SQL Video
    • SQLAuthority News
    • Personal
  • Books
  • Consulting
A tennis ball machine sending every ball to the same spot on a clay court, the marks clustered in one place.

Repeatable Test Data With a Fixed Random Seed

September 15, 2023
Pinal Dave
SQL Tips and Tricks
SQL Function, SQL Random, SQL Server, Testing

Generate repeatable test data with a fixed RAND seed or row-number hashes, then verify identical names and amounts across runs.

Read More
random rows

SQL SERVER – Techniques for Retrieving Random Rows

August 25, 2023
Pinal Dave
SQL Tips and Tricks
SQL Function, SQL Random, SQL Top

This post will explore various techniques to retrieve random rows in SQL Server and analyze their performance and randomness characteristics in depth.

Read More
Selecting Random n Rows from a Table.

SQL SERVER – Selecting Random n Rows from a Table

September 24, 2018
Pinal Dave
SQL Tips and Tricks
SQL Random, SQL Scripts, SQL Server

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.

Read More
OTP file.

SQL SERVER – Simple Method to Generate Fixed Digit OTP Code Using Random Function

August 22, 2018
Pinal Dave
SQL Tips and Tricks
SQL Password, SQL Random, SQL Scripts, SQL Server

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.

Read More
How to Generate Random Password.

SQL SERVER – How to Generate Random Password? – Enhanced Version – Part 2

August 15, 2018
Pinal Dave
SQL Tips and Tricks
SQL Login, SQL Password, SQL Random, SQL Scripts, SQL Server, SQL Server Security

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.

Read More
How to Generate Random Password.

SQL SERVER – How to Generate Random Password? – Enhanced Version

August 2, 2018
Pinal Dave
SQL Tips and Tricks
SQL Password, SQL Random, SQL Scripts, SQL Server, SQL Stored Procedure

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.

Read More
How to Generate Random Password.

How to Generate Random Password in SQL Server? – Interview Question of the Week #181

July 8, 2018
Pinal Dave
SQL Interview Questions and Answers
SQL Random, SQL Scripts, SQL Server, SQL Server Security

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

Read More
1 2 3 Next
  • Books
  • Testimonials
  • Privacy Policy

© 2006 – 2026 All rights reserved. pinal @ SQLAuthority.com