Showing posts with label Generate Random String SQL. Show all posts
Showing posts with label Generate Random String SQL. Show all posts

Tuesday, December 18, 2018

Generate Random String in Oracle

The following query generate random email address.
SQL> select dbms_random.string('l', 8)||'@'||dbms_random.string('l', 7)||'.com' 
        email from dual;

EMAIL
------------------------------------------------------------------------------------
irslsxrf@wltikyv.com
The first parameter 'l' means string will be created in lower cases.