大数据就业实战培训 Oracle就业实战培训
071考试题库之前是比较稳定的,但随着Oracle的调整,071考试不断的增加新的考题,增加了考试的难度,所以我们专门收集整理了这些考试,并对这些考题进行解析,希望可以对考生有帮助。
每周五晚8点,我们有免费的OCP解析公开课,地址:https://ke.qq.com/course/326223 OCP题库交流群:1015267481,验证ocp
-------------------------------------------------------
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 这样的伪列
调用 SYSDATE, UID, USER,和 USERENV 函数
参考其它列值的查询
)