Oracle 12C OCP-071最新考试题库及答案-5

5、 choose two:

You executed the following CREATE TABLE statement that resulted in an error:

SQL> CREATE TABLE employees(

emp_id NUMBER(10) PRIMARY KEY,

ename VARCHAR2(20),

email NUMBER(3) UNIQUE,

address VARCHAR2(500),

phone VARCHAR2 (20),

resume LONG,

hire_date DATE,

remarks LONG,

dept_id NUMBER(3) CONSTRAINT emp_dept_id_fk REFERENCES departments(dept_id) ,

CONSTRAINT ename_nn NOT NULL(ename));

Identify two reasons for the error.

 

A) The PRIMARY KEY constraint in the EMP_ID column must have a name and must be defined at the

table level only.

B) The FOREIGN KEY keyword is missing in the constraint definition.

C) Only one LONG column can be used per table.

D) FOREIGN KEY defined on the DEPT_ID column must be at the table level only.

E) The NOT NULL constraint on the ENAME column must be defined at the column level.

 

Answer:CE

一个表中最多只能用一个LONG类型:

NOT NULL约束是放在定义的字段后面:

NOT NULL约束放在定义的字段后就可以了:

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值