您的位置:首页 > 产品设计 > UI/UE

UISplitViewController in portrait on iPhone shows detail VC instead of master

2015-06-25 17:17 766 查看
Technorati 标签: ocp 007 题库 oracle Q: 81  Examine the description of the STUDENTS table:
STD_ID              NUMBER(4)
COURSE_ID       VARCHAR2(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)
答案: C,E
Q: 82  Click the Exhibit button and examine the data in the EMPLOYEES  table.
On the EMPLOYEES table, EMPLOYEE_ID is the primary key. MGR_ID is the ID of managers and
refers to the EMPLOYEE_ID. The JOB_ID column is a NOT NULL column.
Evaluate this DELETE statement:
         DELETE employee_id, salary, job_id
         FROM   employees
         WHERE  dept_id = 90;
Why does the DELETE statement fail when you execute it?


A.   There is no row with dept_id 90 in the EMPLOYEES table.
B.   You cannot delete the JOB_ID column because it is a NOT NULL column.
C.   You cannot specify column names in the DELETE clause of the DELETE statement.
D.   You cannot delete the EMPLOYEE_ID column because it is the primary key of the table.
答案:C
Q: 83  Which three statements about subqueries are true?  (Choose three.)
A.   A single row subquery can retrieve only one column and one row.
B.   A single row subquery can retrieve only one row but many columns.
C.   A multiple row subquery can retrieve multiple rows and multiple columns.
D.   A multiple row subquery can be compared using  the ">" operator.
E.   A  single row subquery can use the IN operator.
F.   A multiple row subquery can use the "=" operator.
答案:B,C,E
Q: 84  Examine the description of the EMPLOYEES table:
EMP_ID                NUMBER(4)         NOT NULL
LAST_NAME        VARCHAR2(30)   NOT NULL
FIRST_NAME       VARCHAR2(30)
DEPT_ID              NUMBER(2)
Which statement produces the number of different departments that have employees with last name
Smith?
A.   SELECT COUNT(*)
FROM   employees
WHERE  last_name='Smith';
B.   SELECT COUNT(dept_id)
FROM   employees
WHERE  last_name='Smith';
C.   SELECT DISTINCT(COUNT(dept_id))
FROM   employees
WHERE  last_name='Smith';
D.   SELECT COUNT(DISTINCT dept_id)
FROM   employees
WHERE  last_name='Smith';
E.   SELECT UNIQUE(dept_id)
FROM   employees
WHERE  last_name='Smith';
答案:D
 
Q: 85  Which view should a user query to display the columns associated with the
constraints on a table owned by the user?
A.   USER_CONSTRAINTS
B.   USER_OBJECTS
C.   ALL_CONSTRAINTS
D.   USER_CONS_COLUMNS
E.   USER_COLUMNS
答案:D
Q: 86  You need to design a student registration database that contains several
tables storing academic information.
The STUDENTS table stores information about a student. The STUDENT_GRADES table stores
information about the student's grades.  Both of the tables have a column named STUDENT_ID.  The
STUDENT_ID column in the STUDENTS table is a primary key.
You need to create a foreign key on the STUDENT_ID column of the STUDENT_GRADES table that
points to the STUDENT_ID column of the STUDENTS table.  Which statement creates the foreign key?
A.   CREATE TABLE student_grades
(student_id    NUMBER(12),
semester_end   DATE,
gpa            NUMBER(4,3),
CONSTRAINT student_id_fk REFERENCES (student_id)
FOREIGN KEY students(student_id));
B.   CREATE TABLE student_grades
(student_id    NUMBER(12),
semester_end   DATE,
gpa            NUMBER(4,3),
student_id_fk FOREIGN KEY (student_id)
REFERENCES students(student_id));
C.   CREATE TABLE student_grades
(student_id    NUMBER(12),
semester_end   DATE,
gpa            NUMBER(4,3),
CONSTRAINT FOREIGN KEY (student_id)
REFERENCES students(student_id));
D.   CREATE TABLE student_grades
(student_id    NUMBER(12),
semester_end   DATE,
gpa            NUMBER(4,3),
CONSTRAINT student_id_fk FOREIGN KEY (student_id)
REFERENCES students(student_id));
答案:D
Q: 87  Click the Exhibit button and examine the data in the EMPLOYEES and DEPARTMENTS tables.


You want to retrieve all employees, whether or not they have matching departments in the departments
table.  Which query would you use?
A.   SELECT last_name, department_name
FROM employees NATURAL JOIN departments;
B.   SELECT last_name, department_name
FROM employees JOIN departments ;
C.   SELECT last_name, department_name
FROM employees e JOIN departments d
ON (e.department_id = d.department_id);
D.   SELECT last_name, department_name
FROM employees e
RIGHT OUTER  JOIN departments d ON (e.department_id = d.department_id);
E.   SELECT last_name, department_name
FROM employees FULL JOIN  departments
ON (e.department_id = d.department_id);
F.   SELECT last_name, department_name
FROM employees e LEFT OUTER
JOIN departments d ON (e.department_id = d.department_id);
答案:F
Q: 88  Evaluate the set of SQL statements:
        CREATE TABLE dept
        (deptno   NUMBER(2),
         dname     VARCHAR2(14),
         loc       VARCHAR2(13));
         ROLLBACK;
         DESCRIBE DEPT
What is true about the set?
A.   The DESCRIBE DEPT statement displays the structure of the DEPT table.
B.   The ROLLBACK statement frees the storage space occupied by the DEPT table.
C.   The DESCRIBE DEPT statement returns an error ORA-04043: object DEPT does not exist.
D.   The DESCRIBE DEPT statement displays the structure of the DEPT table only if there is a COMMIT
statement introduced before the ROLLBACK statement.
答案:A
解析:ddl语言是自动提交的,不能回滚。
Q: 89  Evaluate the SQL statement:
            TRUNCATE TABLE DEPT;
Which three are true about the SQL statement? (Choose three.)
A.   It releases the storage space used by the table.
B.   It does not release the storage space used by the table.
C.   You can roll back the deletion of rows after the statement executes.
D.   You can NOT roll back the deletion of rows after the statement executes.
E.   An attempt to use DESCRIBE on the DEPT table after the TRUNCATE statement executes will display an
error.
F.   You must be the owner of the table or have DELETE ANY TABLE system privileges to truncate the DEPT
table.
答案:A,D,F
Q: 90  For which two actions can you use the TO_DATE function? (Choose two.)
A.   convert any date literal to a date
B.   convert any numeric literal to a date
C.   convert any date to a character literal
D.   format 'January 10 1999'  for input
E.   format '10-JAN-99' to  'January 10 1999'
答案:A,D

Q: 91  Click the Exhibit button to examine the data of the EMPLOYEES table.
Evaluate this SQL statement:
SELECT  e.employee_id "Emp_id", e.emp_name "Employee", e.salary,
                m.employee_id "Mgr_id", m.emp_name "Manager"
FROM    employees e JOIN employees m
ON   (e.mgr_id = m.employee_id)
AND     e.salary > 4000;
What is its output?












答案:B
Q: 92  A subquery can be used to ___.
A.   create groups of data
B.   sort data in a specific order
C.   convert data to a different format
D.   retrieve data  based on an unknown condition
答案:D
解析:当需要对某个表先做处理,然后才能确定这个表哪些记录符合要求时,用子查询。
Q: 93  In which scenario would an index be most useful?
A.   The indexed column is declared as NOT NULL.
B.   The indexed columns are used in the FROM clause.
C.   The indexed columns are part of an expression.
D.   The indexed column contains a wide range of values.
答案:D
解析:理论上,当要查询的记录小于总记录数2%-5%时,使用索引才有意义。
Q: 94  Which SQL statement displays the date March 19, 2001 in a format that
appears as "Nineteenth of March 2001 12:00:00 AM"?
A.   SELECT
TO_CHAR(TO_DATE('19-Mar-2001', 'DD-Mon-YYYY'), 'fmDdspth
"of" Month YYYY fmHH:MI:SS AM') NEW_DATE
FROM dual;
B.   SELECT
TO_CHAR(TO_DATE('19-Mar-2001', 'DD-Mon-YYYY'), 'Ddspth
"of" Month YYYY fmHH:MI:SS AM') NEW_DATE
FROM dual;
C.   SELECT
TO_CHAR(TO_DATE('19-Mar-2001', 'DD-Mon-YYYY'), 'fmDdspth "of" Month YYYY HH:MI:SS AM')
NEW_DATE
FROM dual;
D.   SELECT
TO_CHAR(TO_DATE('19-Mar-2001', 'DD-Mon-YYYY'), 'fmtDdspth "of" Month YYYY fmtHH:MI:SS AM')
NEW_DATE
FROM dual;
答案:A
解析:第一次用fm,ddspth,fm是前缀对月或日或年值,禁止填充;ddspth是dd,sp,th的组合。

Q: 95  Evaluate the SQL statement:
       SELECT ROUND(TRUNC(MOD(1600,10),-1),2)
       FROM dual;
What will be displayed?
A.   0
B.   1
C.   0.00
D.   an error statement
答案:A
Q: 96  Which three statements correctly describe the functions and use of constraints? (Choose three.)
A.   Constraints provide data independence.
B.   Constraints make complex queries easy.
C.   Constraints enforce rules at the view level.
D.   Constraints enforce rules at the table level.
E.   Constraints prevent the deletion of a table if there are dependencies.
F.   Constraints prevent the deletion of an index if there are dependencies.
答案:C,D,E
解析:
A:约束是使数据间有一定的关联行,比如唯一性约束;
B:约束不会让复杂的查询边简单,约束只在插入数据的时候起作用,不影响查下。
C,D:约束作用与表,同时也作用于基于此表的视图;
E:一个字段是其它表的外键,在删除这个记录时,就会被阻止,因为会影响到有关系的表。
F:我理解是一个字段原来是所以字段,后面删除该索引,对实际表不会有影响的。
Q: 97  Evaluate this SQL statement:
       SELECT ename, sal, 12*sal+100
       FROM emp;
The SAL column stores the monthly salary of the employee.  Which change must be made to the above
syntax to calculate the annual compensation as "monthly salary plus a monthly bonus of $100, multiplied
by 12"?
A.   No change is required to achieve the desired results.
B.   SELECT ename, sal, 12*(sal+100) FROM emp;
C.   SELECT ename, sal, (12*sal)+100 FROM emp;
D.   SELECT ename, sal+100,*12 FROM emp;
答案:B
Q: 98  Click the Exhibit button and examine the data from the EMP table.
The COMMISSION column shows the monthly commission earned by the employee.
Which two tasks would require subqueries or joins in order to be performed in a single step? (Choose two.)



A.   listing the employees who earn the same amount of commission as employee 3
B.   finding the total commission earned by the employees in department 10
C.   finding the number of employees who earn a commission that is higher than the average commission of the
company
D.   listing the departments whose average commission is more than 600
E.   listing the employees who do not earn commission and who are working for department 20 in descending
order of the employee ID
F.   listing the employees whose annual commission is more than 6000
答案:A,C
Q: 99  Click the Exhibit button and examine the data from the ORDERS and CUSTOMERS tables.
Which SQL statement retrieves the order ID, customer ID, and order total for the orders that are placed
on the same day that Martin placed his orders?






A.   SELECT ord_id, cust_id, ord_total
FROM  orders, customers
WHERE  cust_name='Martin'
AND  ord_date IN ('18-JUL-2000','21-JUL-2000');
B.   SELECT ord_id, cust_id, ord_total
FROM orders
WHERE ord_date IN (SELECT ord_date
FROM orders
WHERE cust_id = (SELECT cust_id
FROM  customers
WHERE cust_name =
'Martin'));
C.   SELECT ord_id, cust_id, ord_total
FROM orders
WHERE ord_date IN (SELECT ord_date
FROM orders, customers
WHERE cust_name = 'Martin');
D.   SELECT ord_id, cust_id, ord_total
FROM   orders
WHERE cust_id IN (SELECT cust_id
FROM  customers
WHERE cust_name = 'Martin');
答案:B
Q: 100  What are two reasons to create synonyms? (Choose two.)
A.   You have too many tables.
B.   Your tables are too long.
C.   Your tables have difficult names.
D.   You want to work on your own tables.
E.   You want to use another schema's tables.
F.   You have too many columns in your tables.
答案:C,E
解析:
同义词,可以隐藏表创建者具体信息,简化表名。
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: