I am trying to select a random 10% sample from a small table. I thought that I just use the RAND () function and select those lines where the random number is less than 0.10:
SELECT * FROM SomeTable
WHERE SomeColumn='SomeCondition' AND
RAND() < 0.10
But I soon discovered that RAND () always returns the same number! Reminds me of this xkcd cartoon .

OK, no problem, the RAND function takes on its initial value. I will run this query periodically, and I want it to give different results if I run it on another day, so I sow it with a combination of date and unique string identifier:
SELECT * FROM SomeTable
WHERE SomeColumn='SomeCondition' AND
RAND(CAST(GETDATE) AS INTEGER) + RowID) < 0.10
! , RAND, , . , RAND . , !
, :
SQL Server
SQL?
. TABLESAMPLE , , , , WHERE. TOP NEWID , , .
- ?
: AlexCuse , . , , RAND ?