【Oracle 12c】最新CUUG OCP-071考试题库(60题)

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 函数

参考其它列值的查询

)

原文地址:https://blog.51cto.com/13854012/2358321

时间: 2024-10-07 01:33:09

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

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

69.(31-1)choose the best answer: Evaluate the following query: SELECT INTERVAL '300' MONTH, INTERVAL '54-2' YEAR TO MONTH, INTERVAL '11:12:10.1234567' HOUR TO SECOND FROM dual; What is the correct output of the above query? A) +25-00 , +00-650, +00 1

【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 BOOKS table contains details of 100 books. Examine the commands executed and their outcome: SQL>INSERT INTO books VALUES ('ADV112', 'Adventures of Tom

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

71.(32-18) choose three Which three statements indicate the end of a transaction? (Choose three.) A) after a CREATE statement is issued B) after a SELECT statement is issued C) after a ROLLBACK is issued D) after a SAVEPOINT is issued E) after a COMM

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

72.View the exhibit for the structure of the STUDENTand FACULTYtables. STUDENT Name Null? Type STUDENT_ID NOT NULL NUMBER(2) STUDENT_NAME VARCHAR2(20) FACULTY_ID VARCHAR2(2) LOCATION_ID NUMBER(2) FACULTY Name Null? Type FACULTY_ID NOT NULL NUMBER(2)

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

74.View the exhibit and examine the structure of ORDERS and CUSTOMERS tables. ORDERS Name     Null?       Type ORDER_ID  NOT NULL  NUMBER(4) ORDER_DATE  NOT NULL   DATE ORDER_MODE   VARCHAR2(8) CUSTOMER_ID NOT NULL  NUMBER(6) ORDER_TOTAL   NUMBER(8,

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

73.Which statement correctly grants a system privilege? A. GRANT CREATE VIEW ON table1 TO user1; B. GRANT ALTER TABLE TO PUBLIC; C. GRANT CREATE TABLE TO user1, user2; D. GRANT CREATE SESSION TO ALL; Correct Answer: C Section: (none) Explanation 解析:无

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

75.Which statements are correct regarding indexes? (Choose all that apply.) A. A non-deferrable PRIMARY KEYor UNIQUE KEYconstraint in a table automatically attempts to creates a unique index. B. Indexes should be created on columns that are frequentl

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

76.View the exhibit and examine the description of the DEPARTMENTSand EMPLOYEEStables. The retrieve data for all the employees for their EMPLOYEE_ID, FIRST_NAME, and DEPARTMENT NAME, the following SQL statement was written: SELECT employee_id, first_

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

77.Which two statements are true about sequences created in a single instance database? (Choose two.) A. When the MAXVALUElimit for the sequence is reached, you can increase the MAXVALUElimit by using the ALTER SEQUENCEstatement. B. DELETE < sequence

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

78.View the exhibit and examine the structure of the CUSTOMERStable. Which two tasks would require subqueries or joins to be executed in a single statement? A. finding the number of customers, in each city, whose credit limit is more than the average