Quantcast
Channel: randomize in T-SQL
Viewing all articles
Browse latest Browse all 9

randomize in T-SQL

$
0
0

Hi, 

Why my RAND() is not random?

select top 100 floor(RAND()*100) from sys.columns

It all returns the same result. 

I'm trying to use some kind of random() as aggregate instead of max()/min(), so as to randomly pick a record from a group.

Thanks




Viewing all articles
Browse latest Browse all 9

Latest Images

Trending Articles





Latest Images