個人比較在意的047題庫中的若干考題(一)
9. Evaluate the following CREATE SEQUENCE statement:
CREATE SEQUENCE seq1
START WITH 100
INCREMENT BY 10
MAXVALUE 200
CYCLE
NOCACHE
The sequence SEQ1 has generated numbers up to the maximum limit of 200.
You issue the following SQL statement: SELECT seq1.nextval FROM dual
What is displayed by the SELECT statement?
A. 1
B. 10
C. 100
D. an error
Answer: A
34. View the Exhibit and examine the structure of the ORDERS and ORDER_ITEMS tables.
Evaluate the following SQL statement:
SELECT oi.order_id, product_id, order_date
FROM order_items oi JOIN orders o
USING(order_id)
Which statement is true regarding the execution of this SQL statement?
A. The statement would not execute because table aliases are not allowed in the JOIN clause.
B. The statement would not execute because the table alias prefix is not used in the USING clause.
C. The statement would not execute because all the columns in the SELECT clause
are not prefixed with table aliases.
D. The statement would not execute because the column part of the USING clause cannot have a
qualifier in the SELECT list.
Answer: D
36. Evaluate the following statements:
CREATE TABLE digits
(id NUMBER(2),
description VARCHAR2(15))
INSERT INTO digits VALUES (1,'ONE')
UPDATE digits SET description ='TWO' WHERE id=1
INSERT INTO digits VALUES (2,'TWO')
COMMIT
DELETE FROM digits
SELECT description FROM digits
VERSIONS BETWEEN TIMESTAMP MINVALUE AND MAXVALUE
What would be the outcome of the above query?
A. It would not display any values.
B. It would display the value TWO once.
C. It would display the value TWO twice.
D. It would display the values ONE, TWO, and TWO.
Answer: C
42. SCOTT is a user in the database.
Evaluate the commands issued by the DBA:
1 CREATE
ROLE mgr
2 GRANT
CREATE TABLE, SELECT
ON oe.orders
TO mgr
3 GRANT
mgr, create table TO SCOTT
Which statement is true regarding the execution of the above commands?
A. Statement 1 would not execute because the WITH GRANT option is missing.
B. Statement 1 would not execute because the IDENTIFIED BY
C. Statement 3 would not execute because role and system privileges cannot be granted
together in a single GRANT statement.
D. Statement 2 would not execute because system privileges and object privileges cannot
be granted together in a single GRANT command.
Answer: D
43. Which statement best describes the GROUPING function?
A. It is used to set the order for the groups to be used for calculating the grand totals and subtotals.
B. It is used to form. various groups to calculate total and subtotals created using ROLLUP and CUBE
operators.
C. It is used to identify if the NULL value in an expression is a stored NULL value or created by ROLLUP
or CUBE.
D. It is used to specify the concatenated group expressions to be used for calculating the grand totals and
subtotals.
Answer: C
45. View the Exhibit and examine the structure of the CUSTOMERS table.
CUSTOMER_VU is a view based on CUSTOMERS_BR1 table which has the same structure as
CUSTOMERS table. CUSTOMERS needs to be updated to reflect the latest information about the
customers.
What is the error in the following MERGE statement?
MERGE INTO customers c
USING customer_vu cv
ON (c.customer_id = cv.customer_id)
WHEN MATCHED THEN
UPDATE SET
c.customer_id = cv.customer_id,
c.cust_name = cv.cust_name,
c.cust_email = cv.cust_email,
c.income_level = cv.income_level
WHEN NOT MATCHED THEN
INSERT VALUES(cv.customer_id,cv.cust_name,cv.cust_email,cv,income_level)
WHERE cv.income_level >100000
A. The CUSTOMER_ID column cannot be updated.
B. The INTO clause is misplaced in the command.
C. The WHERE clause cannot be used with INSERT.
D. CUSTOMER_VU cannot be used as a data source.
Answer: A
50. View the Exhibit and examine the data in the DEPARTMENTS tables.
Evaluate the following SQL statement:
SELECT department_id "DEPT_ID", department_name , 'b'
FROM departments
WHERE department_id=90
UNION
SELECT department_id, department_name DEPT_NAME, 'a'
FROM departments
WHERE department_id=10
Which two ORDER BY clauses can be used to sort the output of the above statement? (Choose two.)
A. ORDER BY 3
B. ORDER BY 'b'
C. ORDER BY DEPT_ID
D. ORDER BY DEPT_NAME
Answer: AC(如果每個select中對應的欄位都有alias,那麼order by時必須加",
如果只有第一個select有alias,那麼 order by時絕對不能加",否則報錯)
60. View the Exhibit and examine DEPARTMENTS and the LOCATIONS tables.
Evaluate the following SQL statement:
SELECT location_id, city
FROM locations
l WHERE NOT EXISTS (SELECT location_id
FROM departments
WHERE location_id <> l.location_id)
This statement was written to display LOCATION_ID and CITY where there are no departments located.
Which statement is true regarding the execution and output of the command?
A. The statement would execute and would return the desired results.
B. The statement would not execute because the = comparison operator is missing
in the WHERE clause of the outer query.
C. The statement would execute but it will return zero rows because the WHERE clause
in the inner query should have the = operator instead of <>.
D. The statement would not execute because the WHERE clause in the outer query is
missing the column name for comparison with the inner query result.
Answer: C
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/20801486/viewspace-731968/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- ocp題庫047中重複的題目(引用)
- 一個字串比較的題字串
- iOS-靜態庫聯調中的若干問題iOS
- 比較重要的例題
- MySQL中NULL欄位的比較問題MySqlNull
- 11g oracle 047題庫解析Oracle
- 11g oracle OCP 047題庫解析Oracle
- 11G oracle OCP 047題庫解析Oracle
- 找到的比較好的工作面試題筆試題面試題筆試
- 一些比較典型的機率期望問題
- php比較運算子的安全問題PHP
- 假定已經獲取題庫中的試題號抽取n題組成考題字串字串
- RowFish -- 開源一款比較好看的docusaurus主題
- 一個有關多域名session的問題,比較棘手Session
- 一道比較少見的基礎面試題,考考大家面試題
- OCP考試題庫-185題
- 前端:說說工作中解決過的印象比較深刻的問題前端
- 版本號比較大小問題
- Java 字串比較、拼接問題Java字串
- 【CAA智庫】寧濱院士:智慧交通中的若干科學和技術問題
- 關於若干資料平均放入若干個盒子的問題
- JS解出最近比較火的刑偵推理題JS
- JAVA中文比較問題的分析和解決 (轉)Java
- 最近解決了一個比較複雜的“死鎖”問題
- 想問一個比較簡單的問題,java中的Object怎麼可以被多重繼承,JavaObject繼承
- 1z042/043/047 模擬軟體和題庫
- MySQL 一種比較經濟的資料庫MySql資料庫
- 處理若干行輸出的題目
- 請問在JAVA WEB專案中一個比較棘手的問題JavaWeb
- 一些常見的並且比較難解決的設計問題
- 面試題:你工作中碰到的印象比較深的 bug,你怎麼處理的?面試題
- PHP中的比較運算子PHP
- csapp bomblab1—6+secret,較為全面,每個人的題不一樣。APP
- 一個比較難的問題:如何讓 unittest 的報告中錯誤情況有日誌輸出?
- Oracle dblink比較兩個庫中的表欄位Oracle
- 工廠模式的問題 比較淺顯高手莫嫌模式
- php關於金額比較引發的問題(轉)PHP
- 某電商專案的若干技術問題