connect by 를 잘 이용하시면 됩니다.
CREATE TABLE emptest
AS
SELECT ROWNUM AS id
, MOD(ROWNUM,100) AS grp --2000개씩 그룹핑
, DBMS_RANDOM.STRING('u',5) AS val --랜덤 문자5개
, DBMS_RANDOM.STRING('u',30) AS pad --랜덤문자 30개
FROM dual
CONNECT BY ROWNUM <= 2000000 --200만건 만들자...
CREATE TABLE emptest
AS
SELECT ROWNUM AS id
, MOD(ROWNUM,100) AS grp --2000개씩 그룹핑
, DBMS_RANDOM.STRING('u',5) AS val --랜덤 문자5개
, DBMS_RANDOM.STRING('u',30) AS pad --랜덤문자 30개
FROM dual
CONNECT BY ROWNUM <= 2000000 --200만건 만들자...
댓글 없음:
댓글 쓰기