ORACLE里面取随机数,用到是
dbms_random这个包
1. dbms_random.value
2.第二种形式返回一个大于或等于 LOW ,小于 HIGH 的随机数。
1.
2.第二种形式返回一个大于或等于 LOW ,小于 HIGH 的随机数。
dbms_random.value(55,100)
3.NORMAL 函数返回服从正态分布的一组数。此正态分布标准偏差为 1 ,期望值为 0 。这个函数返回的数值中有 68% 是介于 -1 与 +1 之间, 95% 介于 -2 与 +2 之间, 99% 介于 -3 与 +3 之间
dbms_random.normal
4.string 函数返回一个长度达 60 个字符的随机字符串
dbms_random.string(opt, len);The function string returns a string whose length is determined by the len argument.
The returned string's characteristics are determined by the
opt argument. opt must be a
char
. The following five options are possible:
'u' or 'U': | Upper case alpha characters |
'l' or 'L': | Lower case alpha characters |
'a' or 'A': | Upper and lower case alpha characters |
'x' or 'X': | Upper alpha and numeric characters |
'p' or 'P': | Any printable character |
概念说明-随机数的种子:(dbms_random.seek(12345678))