1. 예제 테이블 생성
create table used_car(
maker varchar2(100), -- 제조사
model varchar2(100), -- 모델명
colour varchar2(100), -- 차량색깔
price number -- 가격
);
2. 예제 데이타 생성
insert into used_car( maker, model, colour, price )
values('1.현대','그랜저','검정',2000);
insert into used_car( maker, model, colour, price )
values('1.현대','그랜저','쥐색',2100);
insert into used_car( maker, model, colour, price )
values('1.현대','그랜저','흰색',2200);
insert into used_car( maker, model, colour, price )
values('1.현대','소나타','검정',1500);
insert into used_car( maker, model, colour, price )
values('1.현대','소나타','쥐색',1600);
insert into used_car( maker, model, colour, price )
values('2.기아','K7','검정',2000);
insert into used_car( maker, model, colour, price )
values('2.기아','K7','쥐색',2100);
insert into used_car( maker, model, colour, price )
values('2.기아','K7','흰색',2200);
insert into used_car( maker, model, colour, price )
values('3.BMW','520','검정',2000);
insert into used_car( maker, model, colour, price )
values('3.BMW','520','쥐색',2100);
insert into used_car( maker, model, colour, price )
values('3.BMW','520','흰색',2200);
3. rollup
4. cube
5. grouping sets
'Oracle > [YT] 오라클 실습' 카테고리의 다른 글
#3~5. Table 데이타 생성 (100만개 만들기, PL/SQL , 시퀀스 사용) (0) | 2021.09.12 |
---|---|
#2. Table 생성 (0) | 2021.09.12 |