【071题库】最新OCP-071考试题库解析-第60题
071考试是OCP考试科目的一种,由于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 函数
参考其它列值的查询
)
-
标签错误:<!-- #Label#
labelId=20160707140604
moduleId=1
classId=12231768634
orderby=2
fields=url,title,u_info
attribute=
datatypeId=22192428132
recordCount=3
pageSize=
<htmlTemplate><dt><img src="/images/index_26${index}.jpg" width="100" height="62" /><a href="$url" title="${title}">${title}</a><span>${api.left(u_info,60)}</span></dt></htmlTemplate>
-->
- 我要参加技术沙龙