60、(16-10) 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 函数

参考其它列值的查询

)

【Oracle 12c】最新CUUG OCP-071考试题库(60题)的更多相关文章

  1. 【OCP题库-12c】最新CUUG OCP 071考试题库(72题)

    72.View the exhibit for the structure of the STUDENTand FACULTYtables. STUDENT Name Null? Type ----- ...

  2. 【OCP题库-12c】最新CUUG OCP 071考试题库(71题)

    71.(32-18) choose three Which three statements indicate the end of a transaction? (Choose three.) A) ...

  3. 【OCP题库-12c】最新CUUG OCP 071考试题库(70题)

    70.(31-2)choose the best answer: View the Exhibit and examine the structure of the Book table. The B ...

  4. 【OCP题库-12c】最新CUUG OCP 071考试题库(69题)

    69.(31-1)choose the best answer: Evaluate the following query: SELECT INTERVAL '300' MONTH, INTERVAL ...

  5. 【OCP-12c】2019年CUUG OCP 071考试题库(74题)

    74.View the exhibit and examine the structure of ORDERS and CUSTOMERS tables. ORDERS Name     Null?  ...

  6. 【OCP-12c】2019年CUUG OCP 071考试题库(80题)

    80.View the exhibit and examine the structure in ORDERS and ORDER_ITEMS tables. You need to create a ...

  7. 【OCP-12c】2019年CUUG OCP 071考试题库(79题)

    79.Which statement is true about transactions? A. A set of Data Manipulation Language (DML) statemen ...

  8. 【OCP-12c】2019年CUUG OCP 071考试题库(78题)

    78.View the exhibit and examine the structure of the CUSTOMERStable. Which two tasks would require s ...

  9. 【OCP-12c】2019年CUUG OCP 071考试题库(77题)

    77.Which two statements are true about sequences created in a single instance database? (Choose two. ...

  10. 【OCP-12c】2019年CUUG OCP 071考试题库(76题)

    76.View the exhibit and examine the description of the DEPARTMENTSand EMPLOYEEStables. The retrieve ...

随机推荐

  1. Docker compose自动化部署

    安装 https://docs.docker.com/compose/install/#install-compose

  2. nginx tcp负载均衡配置

    1. nginx从1.9.0后引入模块ngx_stream_core_module,模块是没有编译的,需要用到编译需添加--with-stream配置参数 2. 在 nginx.conf 文件中, 与 ...

  3. C#中使用DLL相关问题

    一,C#调用 C/C++ 库函数 1,UNITY的C# VS工程常常打不开 属性页,右键工程无 [添加引用]项.原因是VS的自带工具[适用于UNITY的工具]导致的. 解决办法:VS-[工具]-[选项 ...

  4. 数组/指针/const/字符串常量的使用传值问题

    #include<stdio.h> #include<string.h> int main() { ] = "abcd"; //常指针a指向字符串常量&qu ...

  5. Mybatis之XML使用Enum枚举传递数据

    在Mybatis中,处理枚举类的TypeHandler有两个: EnumTypeHandler: 用于保存枚举名 EnumOrdinalTypeHandler: 用于保存枚举的序号. 在实际项目中,以 ...

  6. 寄存器CPU存储地址信息和数据信息的地方 CPU通过地址寄存器区分指令和数据

  7. params must be [a-zA-Z0-9] for verification sms

    阿里短信发送短信时返回这个信息,之前是可以发送的,现在阿里应该是做了限制的.如果你的短信模板类型为“验证码”,发送的短信内容只能是包含字母和数字 所以当你的短信内容包含特殊符号和中文时,请把短信模板类 ...

  8. 对象转换利器之Dozer

    什么是Dozer Dozer是一个Java对象转换工具,可以在JavaBean和JavaBean之间进行递归数据复制,并且适应不同复杂的类型.Dozer会直接将名称相同的属性进行复制,属性名不同或者有 ...

  9. Homestead window10 storage:link 不能建立符号链接的处理办法

    重启电脑 1. 以管理员身份运行 cmd 2. vagrant up 3. vagrant ssh 4. php artisan storage:link

  10. 签名Android应用程序

    Android要求对作为产品发布的应用进行签名(包名相同的化,后安装的应用会覆盖前面安装的应用) 签名作用:1.确定发布者的身份.2.确保应用的完整性. 注意:在应用的开发.调试阶段,Eclipse的 ...