Friday, 31 October 2014

Random Password Generation


 In PeopleCode, we can use the Rand function to generate a random number/password  greater than or equal to 0 and less than 1. For example:
&password="ABC" | Int(Rand( )*1000);

In case we want to generate random password using SQL ( say in Set-based processing) we can use DBMS_RANDOM package in Oracle.
SELECT DBMS_RANDOM.STRING('P', 10) FROM PS_INSTALLATION;

No comments:

Post a Comment