admin管理员组

文章数量:1794759

OCP

OCP

一、原题
View the Exhibit and examine the structure of ORD and ORD_ITEMS tables.
The ORD_NO column is PRIMARY KEY in the ORD table and the ORD_NO and ITEM_NO columns are composite PRIMARY KEY in the ORD_ITEMS table.
Which two CREATE INDEX statements are valid? (Choose two.)

A. CREATE INDEX ord_idx1
ON ord(ord_no);
B. CREATE INDEX ord_idx2
ON ord_items(ord_no);
C. CREATE INDEX ord_idx3
ON ord_items(item_no);
D. CREATE INDEX ord_idx4
ON ord,ord_items(ord_no, ord_date,qty);

答案:BC
二、题目翻译
看下面ORD和ORD_ITEMS表的结构,
ORD 表中ORD_NO列是PRIMARY KEY,ORD_ITEMS表中ORD_NO and ITEM_NO是组合PRIMARY KEY。
哪两个CREATE INDEX语句是有效的?(选择两个)
三、题目解析
A选项不正确,因为ORD 表中ORD_NO列是PRIMARY KEY,已经自动创建索引,不能再创建。
B、C选项正确,虽然这两列已经是组合索引,但是可以在两个列中分别再建立索引
D选项,语法不正确

本文标签: OCP