create table 종목(
거래일시 varchar2(3),
종목코드 varchar2(4),
체결건수 number(3),
체결수량 number(4),
거래대금 number(6));
-- 아래 insert 문의 connect by시 메모리 오류를 방지하기 위해 sort_area_size 변경.
alter session set sort_area_size = 1024000;
insert into 종목
select round(dbms_random.value(100,999),0),
dbms_random.string('L',4),
round(dbms_random.value(1,999),0),
round(dbms_random.value(1,9999),0),
round(dbms_random.value(1,999999),0)
from dual
connect by level<=1000000;
commit;
create table data
as
select b.no, a.*
from (select * from 종목) a
, (select rownum as no from dual connect by level <=10) b;
commit;
select * from data; --1,000만건