A salt makes two identical passwords look different, yet it does not slow down guessing. Here is a small demo of both, and what to use instead.
How to Get Random Records from Table? – Interview Question of the Week #105
How do you get random records from a table? This interview question never gets old. Here is the ORDER BY method I use because its syntax is easy to remember.
MySQL – How to Generate Random Number
MySQL’s UUID() function returns a random 36 character value. Here is how to generate random number strings and passwords of any length from it.
SQL SERVER – Generate Different Random Number for Each Group Using RAND() Function
The RAND() function returns the same value for every row in a query. Here is a simple trick to generate a different random number for each group.
Generating Unique, Hard-to-Guess Voucher Codes in T-SQL
Random-looking codes can still be guessed. Build 20 voucher codes from random bytes, check them, and make redemption single-use.
TABLESAMPLE Samples Pages, Not Rows: Sampling a Large Table Right
Compare TABLESAMPLE page sampling with NEWID sorting and CHECKSUM filters by row count, reads, spread, and repeatability.
Generate Random Values in SQL Server: SQL in Sixty Seconds #042
To generate random values in SQL Server, pick the function by the job: RAND for one value, CHECKSUM(NEWID()) for a value on every row, CRYPT_GEN_RANDOM for tokens. The tests here count 100,000 draws and show where the common formulas go wrong.







