Wednesday, March 3, 2010

Rownum trick

SELECT ROWNUM
FROM DUAL
CONNECT BY ROWNUM<=1000000;

or if you need random numbers, just simply use

SELECT DBMS_RANDOM.VALUE
FROM DUAL
CONNECT BY ROWNUM<=1000000;


source : http://www.oracledba.co.uk/tips/cute_rownum.htm

No comments:

Post a Comment

Followers

About Me

Torrance, CA, United States