071考試不僅是OCP11g的考試科目,同時也是OCP 12c的考試科目,所以關(guān)心071考題的同學有很多,對此我們專門收集整理了近期071考試的原題,并對這些考題進行講解,希望幫助廣大考生順利通過071考試。
--------------------------------------------
071考題解析-第60題、choose the best answer:
Evaluate the following SQL commands:
SQL>CREATE SEQUENCE ord_seq
INCREMENT BY 10
START WITH 120
MAXVALUE 9999
NOCYCLE;
SQL>CREATE TABLE ord_items
(ord_no NUMBER(4) DEFAULT ord_seq.NEXTVAL NOT NULL,
item_no NUMBER(3),
qty RIUNBER(3) CHECK (qty BETWEEN 100 AND 200),
expiry_date date CHECK (expiry_date > SYSDATE),
CONSTRAINT it_pk PRIMARY REY (ord_no,item_no),
CONSTRAINT ord_fk FOREIGN KEY(ord_no) REFERENCES orders(ord_no));
The command to create a table fails. Identify the reason for the SQL statement failure.
A) You cannot use SYSDATE in the condition of a CHECK constraint.
B) You cannot use the NEXTVAL sequence value as a DEFAULT value for a column.
C) You cannot use the BETWEEN clause in the condition of a CHECK constraint.
D) You cannot use ORD_NO and ITEM_NO columns as a composite primary key because ORD_NO is also the FOREIGN KEY.
Answer:A
(check 約束中明確要求不能:
參考 CURRVAL, NEXTVAL, LEVEL, 和 ROWNUM 這樣的偽列
調(diào)用 SYSDATE, UID, USER,和 USERENV 函數(shù)
參考其它列值的查詢
)
-----------------------------------------------
OCP解析公開課時間:【每周五晚8點】
OCP解析公開課地址:https://ke.qq.com/course/326223
OCP解析群資料分享:1015267481 驗證:ocp
另外,除了OCP公開課,OCM題庫直播也同步進行中,OCM最新題庫大爆料-【每周四晚8點】,【微信群直播】,可以聯(lián)系咨詢老師進群參與