CUUG内部OCP题库解析-071-文档4

上传人:j*** 文档编号:93170026 上传时间:2019-07-17 格式:DOCX 页数:21 大小:627.46KB
返回 下载 相关 举报
CUUG内部OCP题库解析-071-文档4_第1页
第1页 / 共21页
CUUG内部OCP题库解析-071-文档4_第2页
第2页 / 共21页
CUUG内部OCP题库解析-071-文档4_第3页
第3页 / 共21页
CUUG内部OCP题库解析-071-文档4_第4页
第4页 / 共21页
CUUG内部OCP题库解析-071-文档4_第5页
第5页 / 共21页
点击查看更多>>
资源描述

《CUUG内部OCP题库解析-071-文档4》由会员分享,可在线阅读,更多相关《CUUG内部OCP题库解析-071-文档4(21页珍藏版)》请在金锄头文库上搜索。

1、CUUG内部OCP题库解析-071-文档4题库新特点:oracle 11g版本的ocp认证考试题库,来自cuug整理,考试题大部分都在这里能找到,如果想考ocp认证可以参考这些文档。(071-sql部分考试)下面的题是(071考试-第4个文档)里的一些考题。其他题找相关文档,或者在群里讨论101-5267-481Administrator CUUG内部OCP题库解析-052-文档2 7/17/1931、(12-11) choose the best answer:Examine the structure and data in the PRICE_LIST table:You plan to

2、 give a discount of 25% on the product price and need to display the discount amountin the same format as the PROD_PRICE.Which SQL statement would give the required result?A) SELECT TO_CHAR (TO_NUMBER (prod_price)*.25, $99,999.00)FROM PRICE_LIST;B) SELECT TO_CHAR(prod_price*.25, $99,999.99)FROM PRIC

3、E_LIST;C) SELECT TO_CHAR(TO_NUMBER(prod_price,$99,999.99)*.25,$99,999.00)FROM PRICE LIST;D) SELECT TO_NUMBER (TO_NUMBER(prod_price, $99,999.99)*.25, $99,999.00)FROM PRICE_LIST;CUUGAnswe :A(解析:其实 B答案也可以实现要求,但是它不是最好的,这里需要 to_number转换函数,因为 prod_price本身是 varchar2类型,可以用如下语句实验:SELECT TO_CHAR(to_number al)

4、*.25, $99,999.99)FROM emp; 原来 051的考题培训领航专家)2018-12-1532、(12-14) choose the best answer:Exami e the command to create the BO KS table.SQLCREATE TABLE booksOracle(book_id CHAR(6) PRIMARY KEY,title VARCHAR2(100) NOT NULL,publisher_id VARCHAR2(4), author_id VARCHAR2(50);The BOOK_ID value 101 does not ex

5、ist in the table.Examine the SQL statement:SQL INSERT INTO books(BOOK_ID, TITLE, AUTHOR_ID)VALUES (101, LEARNING SQL, Tim Jones);Which statement is true?A) It executes successfully only if the PUBLISHER_ID column name is added to the columns listand NULL is explicitly specified in the INSERT stateme

6、nt.B) It executes successfully only if NULL is explicity specified in the INSERT statement.C) It executes successfully only if the PUBLISHER_ID column name is added to the columns listin the INSERT statement.D) It executes successfully and the row is inserted with a null PUBLISHER_ID.Answer:D33、(12-

7、15) choose the best answer:View the Exhibit and examine the structure of the ORDER_ITEMS and ORDERS tables.You are asked to retrieve the ORDER_ID, PRODUCT_ID, and total price (UNIT_PRICE multiplied byQUANTITY), where the total price is greater than 50,000.You executed the following SQL statement:SEL

8、ECT order_id, product_id, unit_price*quantity Total PricFROM order_itemsWHERE unit_price*quantity 50000NATURAL JOIN orders;Which statement is true regarding the execution of the statement?A) The statement would not execute because the WHERE clause is before the NATURAL JOIN clause.B) The statement w

9、ould not execute because the USING keyword is missing in the NATURAL JOIN clause.C) The statement would execute and provide the desired result.D) The statement would not execute because the ON keyword is missing the NATURAL JOIN clause.CUUGAnswer:A(解析:注意语法,where 子句应该出现在各种连接的语句后面,比如 right outer join

10、等等。)34、(13-3) choose the best answer:培训领航专家Which statement is true regarding the SESSION RIVS dictionary view?A) It contains the object privileges granted to other users by the current user session.B) It contains the system privileges granted to other users by the current user session. C) It contain

11、s the current system pr vileges available in the user session. D) It contains the current object privileges available in the user session.OracleAnswer:C(解析:SESSION_PRIVS查看的是该当前会话所有的系统权限。 session_r les查看当前会话所激活的所有角色)35、(14-14) choose the best answer:You need to create a table with the following colum

12、n specifications:1. Employee ID (numeric data type) for each employee2. Employee Name (character data type) that stores the employee name3. Hire date, which stores the date of joining the organization for each employee4. Status (character data type), that contains the value ACTIVE if no data is ente

13、red5. Resume (character large object CLOG data type), which contains the resume submitted by theemployeeWhich is the correct syntax to create this table?A) CREATE TABLE 1_EMP(emp_id NUMBER (4) ,emp_name VARCHAR2(25),start_date DATE,emp_tatus VARCHAR2(10) DEFAULT ACTIVE,resume CLOB);B) CREATE TABLE E

14、MP_1(emp_id NUMBER,emp_name VARCHAR2(25),start_date DATE,emp_status VARCHAR2(10) DEFAULT ACTIVE,resume CLOB);C) CREATE TABLE EMP_1(emp_id NUMBER (4) ,emp_name VARCHAR2(25),start_date DATE,e_status VARCHAR2(10) DEFAULT ACTIVE,resume CLOB(200);D) CREATE TABLE EMP_1(emp_id NUMBER (4) ,CUUGe p_name VARC

15、HAR2(25),start_date DATE,emp_status VARCHAR2(10) DEFAULT ACTIVE,resume CLOB);Answer:B(解析:A答案错误是因为表名字第一个必培须是字符,不训能是数字;D答领案错误是因为航字符要用单引专号;C 家答案错误是大对象类型不能指定长度)36、(14-17) choose two:Exami e the structure of the DEPARTM NTS tableOracleYou execute the following command:SQL ALTER TABLE departmentsSET UNUSED (country);Which two statements are true?A) A new column, COUNTRY, can be added to the DEPARTMENTS table after executing the command.B) Indexes created on the COUNTRY column exist until the DROP UNUSED COLUMNS command is executed.

展开阅读全文
相关资源
相关搜索

当前位置:首页 > IT计算机/网络 > 数据库

电脑版 |金锄头文库版权所有
经营许可证:蜀ICP备13022795号 | 川公网安备 51140202000112号