首页 > 代码库 > RAND(x)

RAND(x)

RAND(x) 用于返回一个随机浮点值,范围在 0~1 之间,x 被用作种子值,用来产生重复序列

mysql> SELECT RAND(5), RAND(5), RAND(8);+---------------------+---------------------+---------------------+| RAND(5)             | RAND(5)             | RAND(8)             |+---------------------+---------------------+---------------------+| 0.40613597483014313 | 0.40613597483014313 | 0.15668530311126755 |+---------------------+---------------------+---------------------+

 

 

 

 

    

RAND(x)