The STRING function generates a random string.
Syntax
DBMS_RANDOM.STRING
opt IN CHAR,
len IN NUMBER)
RETURN VARCHAR2;
Parameters
| Parameter |
Description |
| opt |
Specifies the string to return. The rules are:
- 'u', 'U': returns a string in uppercase letters
- 'l', 'L': returns a string in lowercase letters
- 'a', 'A': returns a string with mixed uppercase and lowercase letters
- 'x', 'X': returns a string with uppercase letters and numbers
- 'p', 'P': returns a string with any printable characters Otherwise, the returned string is in uppercase letters.
|
| len |
Returns the length of a string. |
Return values
| Return value |
Description |
| VARCHAR2 |
A VARCHAR2 string is returned. |