dbms_random.string(opt IN CHAR, len IN NUMBER)
RETURN VARCHAR2;
opt seed values:
'a','A' alpha characters only (mixed case)
'l','L' lower case alpha characters only
'p','P' any printable characters
'u','U' upper case alpha characters only
'x','X' any alpha-numeric characters (upper)
例子:
CREATE TABLE random_strings AS
SELECT rownum RNUM,
dbms_random.string('A', 12) RNDMSTR
FROM all_objects
WHERE rownum <= 200;
col rndmstr format a20
SELECT * FROM random_strings;
阅读(483) | 评论(0) | 转发(0) |