OCP-047 Pivoting INSERT
来源:互联网 发布:软件学报是什么期刊 编辑:程序博客网 时间:2024/05/17 01:48
17. View the Exhibit and examine the structure of the MARKS_DETAILS and MARKS
tables.Which is the best method to load data from the MARKS_DETAILS table
to the MARKS table?
A. Pivoting INSERT
B. Unconditional INSERT
C. Conditional ALL INSERT
D. onditional FIRST INSERT
Answer: A
create table MARKS_DETAILS
(
student_id NUMBER(4),
subject_id NUMBER(2),
marks_english NUMBER,
s1 NUMBER,
marks_math NUMBER,
s2 NUMBER,
marks_physics NUMBER,
s3 NUMBER,
marks_chemistry NUMBER,
s4 NUMBER
marks_biology NUMBER,
);
insert into MARKS_DETAILS values(10,1,100,2,120,3,90,4,110,5,88);
create table MARKS
(
student_id NUMBER(4),
subject_id NUMBER(2),
marks NUMBER
);
insert all
into marks values(student_id,subject_id,marks_english)
into marks values(student_id,s1,marks_math)
into marks values(student_id,s2,marks_physics)
into marks values(student_id,s3,marks_chemistry)
into marks values(student_id,s4,marks_biology)
select student_id,subject_id,s1,s2,s3,s4,marks_english,marks_math,
marks_physics,marks_chemistry,marks_biology
from marks_details;
eg2:
某表含有
表头 ID , 年,1月预算,2月预算,3月预算
表值 col1,2012年, a, b, c
这样的5个字段,
我想转成
col1,2012年,1月, a
col1,2012年,2月, b
col1,2012年,3月, c
需要转换的表:test
insert all
into target_test values(id,year,'1月',month1)
into target_test values(id,year,'2月',month2)
into target_test values(id,year,'3月',month3)
select id,year,month1,month2, month3 from test;
- OCP-047 Pivoting INSERT
- insert all/ insert first/ pivoting insert
- ORACLE之pivoting insert等
- pivoting insert(旋转插入
- pivoting insert(旋转插入)
- oracle pivoting insert 用法简介
- pivoting insert(旋转插入)
- 关于pivoting insert ,conditional insert(备忘)
- [每日一题] OCP1z0-047 :2013-07-28 多表插入――pivoting insert(旋转插入)....................17
- OCP-047 insert into values(defualt)
- Extensions to DML and DDL Statements(pivoting insert)
- OCP-047insert into subquery with check option values()
- Pivoting Data in OWB
- Mysql里的Pivoting
- Matrix Inversion (using partial pivoting)
- ocp 认证 047
- OCP-047external table
- OCP-047 MERGE into
- WebCore Rendering I – The Basics
- DM365 DDR时序理解(1)
- Libusb库的使用
- 个人开公司流程
- Android 动画
- OCP-047 Pivoting INSERT
- vim常用指令
- PHP里的instanceof
- HDOJ 3371 Connect the Cities
- 知识更新:通过 GPT 和 Linux 充分利用大型磁盘驱动器
- 第三天课程
- 注释的重要性以及注释的格式
- 运行Hadoop程序,出现 Filesystem closed 异常
- Android音乐编程:控制应用程序的音量和播放