编了1个小程序,用来整理ocp模拟题
从原文到问题
python gjj.py 1Z0-007-06-08-31.txt 1Z0-007-06-08-31q.txt Answer: QUESTION
从原文到答案
python gjj1.py 1Z0-007-06-08-31.txt 1Z0-007-06-08-31a.txt QUESTION
Answer:
原文
QUESTION 9:
Which syntax turns an existing constraint on?
A.ALTER TABLE table_name ENABLE constraint_name;
B.ALTER TABLE table_name STATUS = ENABLE CONSTRAINT constraint_name;
C.ALTER TABLE table_name ENABLE CONSTRAINT constraint_name;
D.ALTER TABLE table_name STATUS = ENABLE CONSTRAINT constraint_name;
E.ALTER TABLE table_name TURN ON CONSTRAINT constraint_name;
F.ALTER TABLE table_name TURN ON CONSTRAINT constraint_name;
Answer: C
Explanation: ALTER TABLE statement with ENABLE CONSTRAINT keywords is correct answer to enable an existing constraint.
Incorrect Answers
A: This statement is missing CONSTRAINT keyword.
B: "STATUS =" is incorrect syntax to enable constraint for the table.
D: There is no STATUS keyword in the command to enable constraint.
E: There is no TURN ON keywords in the command to enable constraint.
F: There is no TURN ON keywords in the command to enable constraint.OCP Introduction to Oracle 9i: SQL Exam Guide, Jason Couchman, p.239-240 Chapter 5: Creating Oracle Database Objects
QUESTION 10:
Examine the description of the STUDENTS table: STD_ID NUMBER(4) COURSE_ID VARCHARD2(10) START_DATE DATE END_DATE DATE
Which two aggregate functions are valid on the START_DATE column? (Choose two)
A.SUM(start_date)
B.AVG(start_date)
C.COUNT(start_date)
D.AVG(start_date, end_date)
E.MIN(start_date)
F.MAXIMUM(start_date)
Answer: C, E
Explanation: It is possible to apply COUNT() and MIN() functions on the column with DATE data type.
Incorrect Answers
A: Function SUM() cannot be used with DATE data type column.
B: Function AVG() cannot be used with DATE data type column.
D: Function AVG() cannot be used with DATE data type column.And function AVG() just has one parameter X, not two.It averages all X column values returned by the SELECT statement.
F: There is no MAXIMUM() function in Oracle, only MAX() function exists.OCP Introduction to Oracle 9i: SQL Exam Guide, Jason Couchman, p.81-85 Chapter 2: Limiting, Sorting, and Manipulating Return Data
整理后题目
QUESTION 9:
Which syntax turns an existing constraint on?
A.ALTER TABLE table_name ENABLE constraint_name;
B.ALTER TABLE table_name STATUS = ENABLE CONSTRAINT constraint_name;
C.ALTER TABLE table_name ENABLE CONSTRAINT constraint_name;
D.ALTER TABLE table_name STATUS = ENABLE CONSTRAINT constraint_name;
E.ALTER TABLE table_name TURN ON CONSTRAINT constraint_name;
F.ALTER TABLE table_name TURN ON CONSTRAINT constraint_name;
QUESTION 10:
Examine the description of the STUDENTS table: STD_ID NUMBER(4) COURSE_ID VARCHARD2(10) START_DATE DATE END_DATE DATE
Which two aggregate functions are valid on the START_DATE column? (Choose two)
A.SUM(start_date)
B.AVG(start_date)
C.COUNT(start_date)
D.AVG(start_date, end_date)
E.MIN(start_date)
F.MAXIMUM(start_date)
整理后答案
QUESTION 9:
Answer: C
Explanation: ALTER TABLE statement with ENABLE CONSTRAINT keywords is correct answer to enable an existing constraint.
Incorrect Answers
A: This statement is missing CONSTRAINT keyword.
B: "STATUS =" is incorrect syntax to enable constraint for the table.
D: There is no STATUS keyword in the command to enable constraint.
E: There is no TURN ON keywords in the command to enable constraint.
F: There is no TURN ON keywords in the command to enable constraint.OCP Introduction to Oracle 9i: SQL Exam Guide, Jason Couchman, p.239-240 Chapter 5: Creating Oracle Database Objects
QUESTION 10:
Answer: C, E
Explanation: It is possible to apply COUNT() and MIN() functions on the column with DATE data type.
Incorrect Answers
A: Function SUM() cannot be used with DATE data type column.
B: Function AVG() cannot be used with DATE data type column.
D: Function AVG() cannot be used with DATE data type column.And function AVG() just has one parameter X, not two.It averages all X column values returned by the SELECT statement.
F: There is no MAXIMUM() function in Oracle, only MAX() function exists.OCP Introduction to Oracle 9i: SQL Exam Guide, Jason Couchman, p.81-85 Chapter 2: Limiting, Sorting, and Manipulating Return Data
|