Home >Database >Mysql Tutorial >Oracle中DBMS_RANDOM.STRING 的用法

Oracle中DBMS_RANDOM.STRING 的用法

WBOY
WBOYOriginal
2016-06-07 16:47:031117browse

Oracle中DBMS_RANDOM.STRING(var1,var2)这个函数有两个参数var1的参数值情况有:u,l,a,x,p

Oracle中DBMS_RANDOM.STRING(var1,var2)

这个函数有两个参数

var1的参数值情况有:u,l,a,x,p

u-->uppercase

l-->lowercase

a-->mixed case

x-->uppercase,alpha&numeric

p-->any printable char

以上的参数值也可以用大写字母,效果一样。

var2表示长度

Demo:

SELECT  DBMS_RANDOM.STRING ('u', 20) FROM DUAL;
SELECT  DBMS_RANDOM.STRING ('l', 20) FROM DUAL;
SELECT  DBMS_RANDOM.STRING ('a', 20) FROM DUAL;
SELECT  DBMS_RANDOM.STRING ('x', 20) FROM DUAL;
SELECT  DBMS_RANDOM.STRING ('p', 20) FROM DUAL;

linux

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Previous article:Oracle 11g IMP-00058Next article:Oracle之Exp、Imp