Oracle.1Z0-051.175q(16)

时间:2026-01-16

OCP 11g 051题库

KEY constraint on the ORD_ID column. Which statement is true in this scenario?

A. You cannot have two constraints on one column.

B. You cannot add a primary key constraint if data exists in the column.

C. The primary key constraint can be created only at the time of table creation .

D. You can add the primary key constraint even if data exists, provided that there are no duplicate values.

Answer: D

QUESTION 35

Which two statements are true regarding constraints? (Choose two.)

A. A table can have only one primary key and one foreign key.

B. A table can have only one primary key but multiple foreign keys.

C. Only the primary key can be defined at the column and table levels.

D. The foreign key and parent table primary key must have the same name.

E. Both primary key and foreign key constraints can be defined at both column and table levels.

Answer: BE

QUESTION 36

Examine the following SQL commands:

SQL>CREATE TABLE products (

prod_id NUMBER(3) CONSTRAINT p_ck CHECK (prod_id > 0),

prod_name CHAR(30),

prod_qty NUMBER(6),

CONSTRAINT p_name NOT NULL,

CONSTRAINT prod_pk PRIMARY KEY (prod_id));

SQL>CREATE TABLE warehouse (

warehouse_id NUMBER(4),

roomno NUMBER(10) CONSTRAINT r_id CHECK(roomno BETWEEN 101 AND 200),

location VARCHAR2(25),

prod_id NUMBER(3),

CONSTRAINT wr_pr_pk PRIMARY KEY (warehouse_id,prod_id),

CONSTRAINT prod_fk FOREIGN KEY (prod_id) REFERENCES products(prod_id));

Which statement is true regarding the execution of the above SQL commands?

A. Both commands execute successfully.

B. The first CREATE TABLE command generates an error because the NULL constraint is not valid.

C. The second CREATE TABLE command generates an error because the CHECK constraint is not valid.

D. The first CREATE TABLE command generates an error because CHECK and PRIMARY KEY constraints cannot be used for the saE. The first CREATE TABLE command generates an error because the column PROD_ID cannot be used in the PRIMARY KEY and FO

Answer: B

QUESTION 37

You issued the following command to drop the PRODUCTS table:

…… 此处隐藏:37字,全部文档内容请下载后查看。喜欢就下载吧 ……
Oracle.1Z0-051.175q(16).doc 将本文的Word文档下载到电脑

精彩图片

热门精选

大家正在看

× 游客快捷下载通道(下载后可以自由复制和排版)

限时特价:4.9 元/份 原价:20元

支付方式:

开通VIP包月会员 特价:19元/月

注:下载文档有可能“只有目录或者内容不全”等情况,请下载之前注意辨别,如果您已付费且无法下载或内容有问题,请联系我们协助你处理。
微信:fanwen365 QQ:370150219