【发布时间】:2014-04-04 08:51:40
【问题描述】:
来自https://dev.mysql.com/doc/refman/5.0/en/mathematical-functions.html#function_rand
...RAND(N)...If a constant integer argument N is specified, it is used as the seed value,...
N 的最大可能值是多少?
说“整数”是指 mysql type 整数(有符号 -2147483648, 2147483647 / 无符号 0, 4294967295 )还是别的什么?
【问题讨论】:
-
@Strawberry 你有这方面的资料吗?
-
这个肯定适用于大于
2^32的值,我刚刚测试过。但我注意到的是一种奇怪的模式。RAND(2147483647)、RAND(2147483647 * 2 + 1)、RAND(2147483647 * 3 + 2)等的值几乎相同,大约为 8 位小数。 -
你们对这个链接 user3414693 发表的意见? bugs.mysql.com/bug.php?id=69999
-
其实好像是BIGINT max,即18446744073709551615
标签: mysql