Use dbms_random.string to create random string : DBMS_RANDOM « System Packages « Oracle PL / SQL






Use dbms_random.string to create random string

   
SQL>
SQL>
SQL> exec dbms_output.put_line( dbms_random.string( 'A', 20 ) );
iRhhzYvyWLroMPNCvSdx

PL/SQL procedure successfully completed.

SQL> exec dbms_output.put_line( dbms_random.string( 'x', 20 ) );
V5HN9YL3C6GJN9BNP4R9

PL/SQL procedure successfully completed.

SQL> exec dbms_output.put_line( dbms_random.string( 'P', 20 ) );
w6aH% ZB[3bjH[;x;6h@

PL/SQL procedure successfully completed.

SQL> exec dbms_output.put_line( dbms_random.string( 'l', 20 ) );
rjncmdlykahvpgjyecax

PL/SQL procedure successfully completed.

SQL> exec dbms_output.put_line( dbms_random.string( 'u', 20 ) );
EHXUUTMYMBAJMHIKKDJM

PL/SQL procedure successfully completed.

SQL>
SQL>
SQL> --

   
    
  








Related examples in the same category

1.ROUND a DBMS_RANDOM.VALUE
2.This script illustrates the use of the DBMS_RANDOM package.
3.Call dbms_random.normal to get a random number
4.dbms_random.value
5.Random string with dbms_random.string
6.Seed a random value with dbms_random.seed
7.Round a random value from dbms_random.value
8.trunc a random value from dbms_random.value
9.mod(abs(dbms_random.random),50000)+1
10.Insert random numbers into a table
11.Insert random value to table