2013-04-20

MySQL - Random number between a given range of integers


This will generate a random number between 180 and 210.

select
floor(
180
+ (
rand()
* (210-180)
)
) as RandomBetween180and210
;

No comments:

Post a Comment