dbms_random.string:
select dbms_random.string('str',num) from dual;
str 可以为空或任意一个字符(u:大写,l:小写,a:大写+小写,x:大写+数字,p:任意字符,其他字符数字或空:大写)
num 表示随机字符个数
例:
select dbms_random.string('u',6) from dual;--大写6位随机字符
上面u替换为其他字符(包括特殊字符),同上
select dbms_random.string('l',6) from dual;--小写6位随机字符(或L)
select dbms_random.string('a',6) from dual;--大写+小写6位随机字符(或A)
select dbms_random.string('x',6) from dual;--大写+数字6位随机字符(或X)
select dbms_random.string('p',6) from dual;--任意字符6位随机字符(或P)
dbms_random.random:
select dbms_random.random from dual;--随机数字,包含负数
dbms_random.value:
select dbms_random.value from dual;--0到1之间
dbms_random.normal:
select dbms_random.normal from dual;--返回标准正态分布的随机数。