Posted By

geekzspot on 12/01/12


Tagged


Versions (?)

Oracle Random String


 / Published in: SQL
 

Produce random fixed length strings, or random strings of random lengths (between a specified range)

  1. SELECT DBMS_RANDOM.STRING('x',DBMS_RANDOM.VALUE(6,6)) FROM DUAL; -- Random string 6 characters in length.
  2.  
  3.  
  4.  
  5.  
  6. SELECT DBMS_RANDOM.STRING('x',DBMS_RANDOM.VALUE(1,9)) FROM DUAL; -- Random string 1..9 characters in length.

Report this snippet  

You need to login to post a comment.