Oracle ocp

合集下载

ocp认证考试题库

ocp认证考试题库

ocp认证考试题库
OCP模拟试题(数据库方向)
1. 选择题
关于Oracle数据库中的数据文件(datafiles),以下哪项说法是正确的?
A. 数据文件只能存储在一个表空间中。

B. 一个数据文件可以属于多个表空间。

C. 一个表空间可以包含多个数据文件。

D. 数据文件的大小是固定的,创建后不能更改。

2. 简答题
描述Oracle数据库中redo log文件的作用及其在数据库恢复中的重要性。

3. SQL操作题
给定一个名为employees的表,其中包含
employee_id, first_name, last_name, email, hire_date, 和 salary等列。

请编写一个SQL查询,找出2022年1月1日之后入职且薪水高于50000的员工。

OCP模拟试题(PL/SQL方向)
1. 选择题
在PL/SQL中,哪个关键字用于声明一个常量?
A. VARIABLE
B. CONSTANT
C. DECLARE
D. STATIC
2. 简答题
解释PL/SQL中的异常处理机制,并举例说明如何在代码中使用BEGIN, EXCEPTION, 和 END块来处理异常。

3. 编程题
编写一个PL/SQL程序,该程序接收一个数字作为输入参数,并计算从1到该数字的所有整数的和。

如果输入的数字小于1,程序应该抛出一个异常。

obcp笔试题库

obcp笔试题库

1、在Oracle数据库中,哪个命令用于创建新的表空间?A、CREATE DATABASEB、CREATE SCHEMAC、CREATE TABLESPACED、CREATE USER(答案:C)2、关于OCP(Oracle Certified Professional)认证,以下哪项描述是错误的?A、OCP认证是Oracle公司提供的专业级认证B、OCP认证需要通过相应的考试才能获得C、OCP认证只需通过理论考试,无需实际操作经验D、OCP认证有助于提升数据库管理员的职业竞争力(答案:C)3、在SQL语句中,哪个关键字用于选择满足特定条件的记录?A、INSERTB、UPDATEC、DELETED、SELECT(答案:D)4、Oracle数据库中的redo log文件主要作用是?A、记录数据库的所有变更操作B、用于数据库的恢复和重建C、记录用户的登录信息D、存储数据库的临时数据(答案:A)5、以下哪项不是Oracle数据库管理员(DBA)的职责?A、数据库的安装与配置B、数据库的性能调优C、数据库的安全管理D、应用程序的开发与维护(答案:D)6、在Oracle数据库中,哪个工具通常用于图形化管理数据库?A、SQL*PlusB、Oracle Enterprise ManagerC、RMAND、Data Pump(答案:B)7、关于Oracle数据库的归档日志模式,以下哪项描述是正确的?A、归档日志模式仅适用于大型数据库B、归档日志模式可以提高数据库的性能C、归档日志模式可以保护数据库免受介质故障的影响D、归档日志模式会显著降低数据库的存储空间(答案:C)8、在Oracle数据库中,哪个视图可以显示当前会话的详细信息?A、DBA_USERSB、V$SESSIONC、ALL_TABLESD、USER_PRIVILEGES(答案:B)。

ocp课程大纲

ocp课程大纲

ocp课程大纲摘要:一、OCP课程简介二、OCP课程大纲概述1.课程模块划分2.课程内容简介三、OCP课程实战应用1.实战案例介绍2.实践技能提升四、OCP课程学习建议1.学习方法与策略2.考试准备与技巧五、OCP课程的价值与意义1.对个人职业发展的影响2.对企业运维能力的提升正文:一、OCP课程简介OCP(Oracle Certified Professional)课程是Oracle 官方认证课程,旨在培养具备Oracle 数据库管理和开发能力的专业人才。

通过学习OCP课程,学员可以熟练掌握Oracle数据库的核心技术,提升工作效率,增强职业竞争力。

二、OCP课程大纲概述1.课程模块划分OCP课程大纲分为五个模块,分别是:数据库管理基础、数据库性能优化、数据库安全、SQL语言和PL/SQL编程。

2.课程内容简介(1)数据库管理基础:介绍Oracle数据库的基本概念、架构和常用管理工具。

(2)数据库性能优化:讲解数据库性能诊断、优化策略和调整技巧。

(3)数据库安全:阐述数据库安全策略、访问控制、加密技术等。

(4)SQL语言:深入解析SQL语句的编写原则和技巧,包括数据查询、数据插入、数据更新等。

(5)PL/SQL编程:介绍PL/SQL编程基础、流程控制、异常处理等。

三、OCP课程实战应用1.实战案例介绍OCP课程紧密结合实际工作场景,通过多个实战案例让学员深入了解Oracle数据库的运维和管理。

例如,数据库性能诊断与优化、数据备份与恢复、SQL语句优化等。

2.实践技能提升课程结束后,学员将具备独立管理和优化Oracle数据库的能力,提升工作效率,为个人和企业创造价值。

四、OCP课程学习建议1.学习方法与策略(1)认真阅读教材,理解课程内容。

(2)动手实践,跟随课程案例操作,巩固理论知识。

(3)定期复习,总结学习笔记,加深印象。

2.考试准备与技巧(1)参加OCP认证考试前,确保掌握课程全部内容。

(2)多做模拟试题,熟悉考试题型和答题技巧。

ocp认证报名条件(二)

ocp认证报名条件(二)

ocp认证报名条件(二)OCP认证报名条件1. 什么是OCP认证?OCP(Oracle Certified Professional)认证是由Oracle公司提供的一项专业认证,旨在评估个人在Oracle产品和技术领域的知识和技能水平。

获得OCP认证可以证明个人具备了成为Oracle专业人士的能力,并且拥有了在Oracle相关职位上有竞争力的优势。

2. OCP认证的重要性•增加就业竞争力:OCP认证是工业界广泛认可的专业证书,持有者在就业市场中具有竞争力。

•提高薪资待遇:通过获得OCP认证,您可以证明自己具备高水平的技能和知识,从而有望获取更高的薪资待遇。

•拓宽职业发展道路:OCP认证为您打开了进一步发展Oracle职业生涯的大门,有助于您在职场中迈出更大的步伐。

3. OCP认证报名条件要报考OCP认证,您需要满足以下条件:•了解相关知识和经验:您需要具备基本的计算机和数据库知识,并且熟悉Oracle产品和技术体系。

•具备相关实践经验:在通过OCP认证考试之前,您需要至少具备一定的实践经验,以确保能够应用所学知识解决实际问题。

•参加官方培训课程:通常情况下,您需要参加Oracle官方认可的培训课程,并且完成课程相关的实验和项目。

4. 如何报名OCP认证考试?•在官方网站上注册账号:首先,您需要在Oracle官方网站上注册一个账号。

这个账号将用于您的OCP认证考试报名和成绩查询等相关事宜。

•选择认证路径:根据自己的实际情况和职业发展目标,选择适合自己的OCP认证路径。

Oracle提供了多个不同的认证路径,包括数据库管理、开发和应用等方向。

•报名参加考试:在选择了认证路径后,您可以通过Oracle官方网站预约考试时间和地点,并且支付相应的考试费用。

•准备考试:在考试前,您需要通过自学或参加培训课程等方式准备考试所需的知识和技能。

•参加考试并查询成绩:按照预约的时间和地点参加考试,并在考试后一段时间内查询您的考试成绩。

Oracle OCP11g考试题库

Oracle OCP11g考试题库

Which statement is true regarding the COALESCE function?A. It can have a maximum of five expressions in a listB. It returns the highest NOT NULL value in the list for all rowsC. It requires that all expressions in the list must be of the same data typeD. It requires that at least one of the expressions in the list must have a NOT NULL valueAnswer: C2.View the Exhibit and examine the structure of the PROMOTIONS table.Which SQL statements are valid? (Choose all that apply.)A. SELECT promo_id, DECODE (NVL(promo_cost,0), promo_cost,promo_cost * 0.25, 100) "Discount"FROM promotions;B. SELECT promo_id, DECODE (promo_cost, 10000,DECODE (promo_category, 'G1', promo_cost *.25, NULL), NULL) "Catcost"FROM promotions;C SELECT promo_id, DECODE(NULLIF(promo_cost, 10000), NULL,promo_cost*.25, 'N/A') "Catcost"FROM promotions;D. SELECTpromo_id,DECODE(promo_cost, >10000, 'High',<10000, 'Low')"Range"FROM promotions;Answer: A, BView the Exhibit and examine the structure of ORDERS and CUSTOMERS tables. There is only one customer with the cust _last_name column having value Roberts. Which INSERT statement should be used to add a row into the ORDERS table for the customer whose CUST LAST NAME is Roberts and CREDIT LIMIT is 600?A. INSERT INTO orders V ALUES (1, '10-mar-2007', 'direct',(SELECT customer_idFROM customersWHERE cust last name= 'Roberts' ANDcredit_limit=600), 1000);B. INSERT INTO orders (order_id,order_date,order_mode,(SELECT customer_idFROM customersWHERE cust last name= 'Roberts' ANDcredit_limit=600),order_total)V ALUES(1, '10-mar-2007', 'direct', &&customer_id, 1000);C. INSERT INTO(SELECT o.order_id, o.order_date,o.order_mode,c.customer_id,o.order_totalFROM orders o, customers cWHERE o.customer_id=c.customer_idAND c.cust_last_name='Roberts' ANDc.credit_limit=600 |V ALUES (1,'10-mar-2007', 'direct',(SELECT customer_idFROM customersWHERE cust_last_name= 'Roberts' AND credit_limit=600 ), 1000);D. INSERT INTO orders (order_id,order_date,order_mode,(SELECT customer_idFROM customersWHERE cust_last_name= 'Roberts' ANDcredit_limit=600),order_total)V ALUES(1,'10-mar-2007', 'direct', &customer_id, 1000);Answer: A4.View the Exhibit and examine the structure of the CUSTOMERS table.Evaluate the following SQL statementSQL> SELECT cust_city, COUNT(cust_last_name)FROM customersWHERE cust_credit_limit > 1000GROUP BY cust_cityHA VING A VG(cust_credit_limit) BETWEEN 5000 AND 6000;Which statement is true regarding the outcome of the above query?A. It executes successfullyB. It returns an error because the BETWEEN operator cannot be used in the HA VING clauseC. It returns an error because WHERE and HA VING clauses cannot be used in the same SELECT statementD. It returns an error because WHERE and HA VING clauses cannot be used to apply conditions on the same columnAnswer: AView the Exhibit and examine the structure of the PROMOTIONS table. Examine the following two SQL statements:Which statement is true regarding the above two SQL statements?A. statement 1 gives an error, statement 2 executes successfullyB. statement 2 gives an error, statement 1 executes successfullyC. statement 1 and statement 2 execute successfully and give the same outputD. statement 1 and statement 2 execute successfully and give a different output Answer: DYou created an ORDERS table with the following description:You inserted some rows in the table. After some time, you want to alter the table by creating the PRIMARY KEY constraint on the ORD_ID column. Which statement is true in this scenario?A. You cannot have two constraints on one columnB. You cannot add a primary key constraint if data exists in the columnC. The primary key constraint can be created only at the time of table creationD. You can add the primary key constraint even if data exists, provided that there are no duplicate valuesAnswer: D7.When does a transaction complete? (Choose all that apply.)A. when a DELETE statement is executedB. when a ROLLBACK command is executedC. when a PL/SQL anonymous block is executedD. when a data definition language (DDL) statement is executedE. when a TRUNCATE statement is executed after the pending transact ionAnswer: B, D, E8.You need to display the first names of all customers from the CUSTOMERS table that contain the character 'e' and have the character 'a' in the second last positionWhich query would give the required output?A. SELECT cust_first_nameFROM customersWHERE INSTR(cust_first_name, 'e') <>0 ANDSUBSTR(cust_first_name, -2, l) ='a';B. SELECT cust first nameFROM customersWHERE INSTR(cust_first_name, 'e') <>" ANDSUBSTR(cust_first_name, -2, l)='a';C. SELECT cust_first_nameFROM customersWHERE INSTR(cust_first_name, 'e') IS NOT NULL ANDSUBSTR(cust_first_name, l, -2)='a';D. SELECT cust_first_nameFROM customersWHERE INSTR(cust_first_name, 'e')<>0 ANDSUBSTR(cust_first_name, LENGTH(cust_first_name),-2)='a';Answer: A9.The ORDERS table belongs to the user OE. OE has granted the SELECT privilege on the ORDERS table to the user HR.Which statement would create a synonym ORD so that HR can execute the following query successfully?SELECT * FROM ord;A. CREATE SYNONYM ord FOR orders; This command is issued by OEB. CREATE PUBLIC SYNONYM ord FOR orders; This command is issued by OEC. CREATE SYNONYM ord FOR oe.orders; This command is issued by the database administratorD. CREATE PUBLIC SYNONYM ord FOR oe.orders; This command is issued by the database administratorAnswer: D10.View the Exhibit and examine the structure of the PRODUCTS tableYou need to generate a report in the following format:Which two queries would give the required output? (Choose two.)A. SELECT prod_name || q"'s category is ' || prod_category CATEGORIESFROM products;B. SELECT prod_name || q'['s]'category is' || prod_category CATEGORIESFROM products;C. SELECT prod_name || q'\'s\' category is '|| prod_category CATEGORIESFROM products;D. SELECT prod_name ||q'<'s>'|| 'category is ' || prod_category CATEGORIESFROM products;Answer: C, D11.Which statement is true regarding the INTERSECT operator?A. It ignores NULL valuesB. Reversing the order of the intersected tables alters the resultC. The names of columns in all SELECT statements must be identicalD. The number of columns and data types must be identical for all SELECT statements in the queryAnswer: D12.Which two statements are true regarding the USING and ON clauses in table joins? (Choose two.)A. Both USING and ON clauses can be used for equijoins and nonequijoinsB. A maximum of one pair of columns can be joined between two tables using the ON clauseC. The ON clause can be used to join tables on columns that have different names but compatible data typesD. The WHERE clause can be used to apply additional conditions in SELECT statements containing the ON or the USING clauseAnswer: C, D13.Examine the structure of the PROGRAMS tableWhich two SQL statements would execute successfully? (Choose two.)A. SELECT NVL(ADD_MONTHS(END_DATE,l),SYSDATE)FROM programs;B. SELECT TO_DATE(NVL(SYSDATE-END_DATE,SYSDATE))FROM programs;C. SELECT NVL(MONTHS_BETWEEN(start_date,end_date),'Ongoing')FROM programs;D. SELECTNVL(TO_CHAR(MONTHS_BETWEEN(start_date,end_date)),'Ongoing') FROM programs;Answer: A, D14.Where can subqueries be used? (Choose all that apply.)A. field names in the SELECT statementB. the FROM clause in the SELECT statementC. the HA VING clause in the SELECT statementD. the GROUP BY clause in the SELECT statementE. the WHERE clause in only the SELECT statementF. the WHERE clause in SELECT as well as all DML statementsAnswer: A, B, C, F15.View the Exhibits and examine the structures of the PRODUCTS, SAL ES, and CUSTOMERS tablesYou need to generate a report that gives details of the customer's last name, name of the product, and the quantity sold for all customers in 'Tokyo'Which two queries give the required result? (Choose two.)A. SELECT c.cust_last_name,p.prod_name,s.quantity_soldFROM sales s JOIN products pUSING(prod_id)JOIN customers cB. SELECT c.cust_last_name, p.prod_name, s.quantity_soldFROM products p JOIN sales s JOIN customers cON(p.prod_id=s.prod_id)ON(s.cust_id=c.cust_id)WHERE c.cust_city='Tokyo';C. SELECT c.cust_last_name, p.prod_name, s.quantity_soldFROM products p JOIN sales sON(p.prod_id=s.prod_id)JOIN customers cON(s.cust_id=c.cust_id)AND c.cust_city='Tokyo';D. SELECT c.cust_id, c.cust_last_name, p.prod_id, p.prod_name, s.quantity_soldFROM products p JOIN sales sUSING(prod_id)JOIN customers cUSING(cust_id)WHERE c.cust_city='Tokyo';Answer: A, C16.View the Exhibit and evaluate the structure and data in the CUST_STATUS table You issue the following SQL statementSQL> SELECT custno, NVL2(NULLIF(amt_spent,credit_limit), 0, 1000) "BONUS"FROM cust_status;Which statement is true regarding the execution of the above query?A. It produces an error because the AMT_SPENT column contains a null valueB. It displays a bonus of 1000forall customers whose AMT_SPENT is less than CREDIT_LIMITC. It displays a bonus of 1000 for all customers whose AMT_SPENT equals CREDIT_LIMIT, or AMT_SPENT is nullD. It produces an error because the TO_NUMBER function must be used to convert the result of the NULLIF function before it can be used by the NVL2 functionAnswer: C17.Examine the structure and data in the PRICE LIST tableYou plan to give a discount of 25% on the product price and need to display the discount amount in the same format as the PROD_PRICE.Which SQL statement would give the required result?A. SELECT TO_CHAR(prod_price* .25, '$99,999.99')FROM PRICE_LIST;B. SELECT TO_CHAR(TO_NUMBER(prod_price)* .25, '$99,999.00')FROM PRICE_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;Answer: C18.You need to generate a list of all customer last names with their credit limits from the CUSTOMERS table. Those customers who do not have a credit limit should appear last in the list.Which two queries would achieve the required result? (Choose two.)A. SELECT cust_last_name, cust_credit_limitFROM customersORDER BY cust_credit_limit DESC;B. SELECT cust_last_name, cust_credit_limitFROM customersORDER BY cust_credit_limit;C. SELECT cust_last_name, cust_credit_limitFROM customersORDER BY cust_credit_limit NULLS LAST;D. SELECT cust_last_name, cust_credit_limitFROM customersORDER BY cust_last_name, cust_credit_limit NULLSLAST;Answer: B, C19.Which two statements are true regarding the COUNT function? (Choose two.)A. The COUNT function can be used only for CHAR, V ARCHAR2, and NUMBER data typesB. COUNT (*) returns the number of rows including duplicate rows and rows containing NULL value in any of the columnsC. COUNT (cust_id) returns the number of rows including rows with duplicate customer IDs and NULL value in the CUST_ID columnD. COUNT(DISTINCT inv_amt) returns the number of rows excluding rows containing duplicates and NULL values in the INV_AMT columnE. A SELECT statement using the COUNT function with a DISTINCT keyword cannot have a WHERE clauseAnswer: B, D20.Which two statements are true regarding single row functions? (Choose two.)A. They accept only a single argumentB. They can be nested only to two levelsC. Arguments can only be column values or constantsD. They always return a single result row for every row of a queried tableE. They can return a data type value different from the one that is referencedAnswer: D, E21.View the Exhibit and examine the data in the COSTS table.You need to generate a report that displays the IDs of all products in the COSTS table whose unit price is at least 25% more than the unit cost. The details should be displayed in the descending order of 25% of the unit cost.You issue the following query:SQL>SELECT prod_idFROM costsWHERE unit_price >= unit_cost * 1.25ORDER BY unit_cost * 0.25 DESC;Which statement is true regarding the above query?A. It executes and produces the required resultB. It produces an error because an expression cannot be used in the ORDER By clauseC. It produces an error because the DESC option cannot be used with an expression in the ORDER BY clauseD. It produces an error because the expression in the ORDER BY clause should also be specified in the SELECT clauseAnswer: A22.View the Exhibit and examine the structure of the CUSTOMERS tableWhich statement would display the highest credit limit available in each income level in each city in the CUSTOMERS table?A. SELECT cust_city, cust_income_level, MAX(cust_credit_limit)FROM customersGROUP BY cust_city, cust_income_level, cust_credit_limit;B. SELECT cust_city, cust_income_level, MAX(cust_credit_limit)FROM customersGROUP BY cust_city, cust_income_level;C. SELECT cust_city, cust_income_level, MAX(cust_credit_limit)FROM customersGROUP BY cust_credit_limit, cust_income_level, cust_city;D. SELECT cust_city, cust_income_level, MAX(cust_credit_limit)FROM customersGROUP BY cust_city, cust_income_level, MAX(cust_credit_limit);Answer: B23.Which two statements are true regarding subqueries? (Choose two.)A. A subquery can retrieve zero or more rowsB. Only two subqueries can be placed atone levelC. A subquery can be used only in SQL query statementsD. A subquery can appear on either side of a comparison operatorE. There is no limit on the number of subquery levels in the WHERE clause of a SELECT statementAnswer: A, D24.View the Exhibit and examine the structure of the PROMOTIONS table.Evaluate the following SQL statement:The above query generates an error on execution.Which clause in the above SQL statement causes the error?A. WHEREB. SELECTC. GROUP BYD. ORDER BYAnswer: C25.You need to create a table for a banking application One of the columns in the table has the following requirements:1) You want a column in the table to store the duration of the credit period2) The data in the column should be stored in a format such that it can be easily addedand subtracted with DATE data type without using conversion functions3) The maximum period of the credit provision in the application is 30days4) The interest has to be calculated for the number of days an individual has taken a credit for.Which data type would you use for such a column in the table?A. DATEB. NUMBERC. TIMESTAMPD. INTERV AL DAY TO SECONDE. INTERV AL YEAR TO MONTHAnswer: D26.View the Exhibit to examine the description for the SALES tableWhich views can have all DML operations performed on it? (Choose all that apply.)A. CREATE VIEW v3AS SELECT * FROM SALESWHERE cust_id = 2034WITH CHECK OPTION;B. CREATE VIEW vlAS SELECT * FROM SALESWHERE time_id <= SYSDATE - 2*365WITH CHECK OPTION;C. CREATE VIEW v2AS SELECT prod_id, cust_id, time_id FROM SALESWHERE time id <= SYSDATE -2*365WITH CHECK OPTION;D. CREATE VIEW v4AS SELECT prod_id, cust_id, SUM(quantity_sold) FROM SALESWHERE time id <= SYSDATE -2*365GROUP BY prod_id, cust_idWITH CHECK OPTION;Answer: A, B27.Which is the valid CREA TE TABLE statement?A. CREATE TABLE emp9$# (emp_no NUMBER(4));B. CREATE TABLE 9emp$# (emp_no NUMBER(4));C. CREATE TABLE emp*123 (emp_no NUMBER(4));D. CREATE TABLE emp9$# (emp_no NUMBER (4), date DATE);Answer: A28.View the Exhibit and examine the data in the PRODUCTS table.You need to display product names from the PRODUCTS table that belong to the'Software/Other' category with minimum prices as either $2000 or $4000 and no unit of measure.You issue the following query:SQL>SELECT prod_name, prod_category, prod_min_priceFROM productsWHERE prod_category LIKE '%Other%' AND (prod_min_price = 2000 OR prod_min_price = 4000) AND prod_unit_of_measure <> ";Which statement is true regarding the above query?A. It executes successfully but returns no resultB. It executes successfully and returns the required resultC. It generates an error because the condition specified forPROD_UNIT_OF_MEASURE is not validD. It generates an error because the condition specified for the PROD_CATEGORY Column is not validAnswer: AView the Exhibit to examine the description for the SALES and PRODUCTS tables. You want to create a SALE _PROD view by executing the following SQL statement:Which statement is true regarding the execution of the above statement?A. The view will be created and you can perform DML operations on the viewB. The view will be created but no DML operations will be allowed on the viewC. The view will not be created because the join statements are not allowed for creating a viewD. The view will not be created because the GROUP BY clause is not allowed for creating a viewAnswer: BWhich three statements are true regarding the data types in Oracle Database 10g/11g? (Choose three.)A. Only one LONG column can be used per tableB. A TIMESTAMP data type column stores only time values with fractional secondsC. The BLOB data type column is used to store binary data in an operating system fileD. The minimum column width that can be specified for a V ARCHAR2 data type column is oneE. The value for a CHAR data type column is blank-padded to the maximum defined column widthAnswer: A, D, E31.View the Exhibit and examine the structure of the PRODUCTS table.Evaluate the following query:What would be the outcome of executing the above SQL statement?A. It produces an errorB. It shows the names of all products in the tableC. It shows the names of products whose list price is the second highest in the tableD. It shows the names of all products whose list price is less than the maximum list priceAnswer: CView the Exhibit and examine the structure of ORD and ORD_ITEMS tables.The ORD_NO column is PRIMARY KEY in the ORD table and the ORD NO and ITEM_NO columns are composite PRIMARY KEY in the ORD ITEMS table. Which two CREATE INDEX statements are valid? (Choose two.)A. CREATE INDEX ord_idxlON ord(ord_no);B. CREATE INDEX ord_idx2ON ord_items(ord_no);C. CREATE INDEX ord_idx3ON ord_items(item_no);D. CREATE INDEX ord_idx4ON ord,ord_items(ord_no, ord_date,qty);Answer: B, C33.Which statement is true regarding subqueries?A. The LIKE operator cannot be used with single-row subqueriesB. The NOT IN operator is equivalent to IS NULL with single-row subqueriesC. =ANY and =ALL operators have the same functionality in multiple-row subqueriesD. The NOT operator can be used with IN, ANY, and ALL operators in multiple-row subqueriesAnswer: DYou are currently located in Singapore and have connected to a remote database in Chicago.You issue the following command:SQL> SELECT ROUND (SYSDATE-promo_begin_date, 0)FROM promotionsWHERE (SYSDATE-promo_begin_date)/365 >2;PROMOTIONS is the public synonym for the public database link for the PROMOTIONS table.What is the outcome?A. an error because the ROUND function specified is invalidB. an error because the WHERE condition specified is invalidC. number of days since the promo started based on the current Chicago date and timeD. number of days since the promo started based on the current Singapore date and timeAnswer: C35.View the Exhibit and examine the structure of the PRODUCTS table.Using the PRODUCTS table, you issue the following query to generate the names, current list price, and discounted list price for all those products whose list price falls below $10 after a discount of 25% is applied on it.SQL>SELECT prod_name, prod_list_price,prod_list_price-(prod_list_price*.25) "DISCOUNTED_PRICE"FROM productsWHERE discounted_price < 10;The query generates an error.What is the reason for the error?A. The parenthesis should be added to enclose the entire expressionB. The double quotation marks should be removed from the column aliasC. The column alias should be replaced with the expression in the WH ERE clauseD. The column alias should be put in uppercase and enclosed within double quotation marks in the WHERE clauseAnswer: C36.View the Exhibit for the structure of the STUDENT and FACULTY tables.You need to display the faculty name followed by the number of students handled by the faculty at the base location.Examine the following two SQL statements:Which statement is true regarding the outcome?A. Only statement 1 executes successfully and gives the required resultB. Only statement 2 executes successfully and gives the required resultC. Both statements 1 and 2 execute successfully and give different resultsD. Both statements 1 and 2 execute successfully and give the same required resultAnswer: DView the Exhibit and examine the structure of CUSTOMERS and SALES tables. Evaluate the following SQL statement:Which statement is true regarding the execution of the above UPD ATE statement? A. It would not execute because two tables cannot be used in a single UPDATE statementB. It would not execute because the SELECT statement cannot be used in place of the table nameC. It would execute and restrict modifications to only the columns specified in the SELECT statementD. It would not execute because a subquery cannot be used in the WHERE clause of an UPDATE statementAnswer: CEvaluate the following query:SQL> SELECT TRUNC(ROUND(156.00,-1),-1)FROM DUAL;What would be the outcome?A. 16B. 100C. 160D. 200E. 150Answer: C39.View the Exhibits and examine the structures of the PROMOTIONS and SALES tables.Evaluate the following SQL statement:Which statement is true regarding the output of the above query?A. It gives the details of promos for which there have been salesB. It gives the details of promos for which there have been no salesC. It gives details of all promos irrespective of whether they have resulted in a sale or notD. It gives details of product 105 that have been sold irrespective of whether they had a promo or notAnswer: C40.View the Exhibit and examine the description of SALES and PROMOTIONS tables You want to delete rows from the SALES table, where the PROMO_NAME column in the PROMOTIONS table has either blowout sale or everyday low price as values Which DELETE statements are valid? (Choose all that apply.)A. DELETEFROM salesWHERE promo_id = (SELECT promo_idFROM promotionsWHERE promo_name = 'blowout sale' ) AND promo_id = (SELECT promo_idFROM promotionsWHERE promo_name = 'everyday low price' );B. DELETEFROM salesWHERE promo_id = (SELECT promo_idFROM promotionsWHERE promo_name = 'blowout sale' ) OR promo_id = (SELECT promo_idFROM promotionsWHERE promo_name = 'everyday low price' );C. DELETEFROM salesWHERE promo_id IN (SELECT promo_idFROM promotionsWHERE promo_name = 'blowout sale' )OR promo_name = 'everyday low price' );D. DELETEFROM salesWHERE promo_id IN (SELECT promo_idFROM promotionsWHERE promo_name IN ('blowout sale', 'everyday lowprice' ));Answer: B, C, D41.View the Exhibit and examine the structure of the PROMOTIONS table.You have to generate a report that displays the promo name and start date for all promos that started after the last promo in the' INTERNET' category.Which query would give you the required output?A. SELECT promo_name, promo_begin_date FROM promotionsWHERE promo_begin_date > ALL (SELECT MAX(promo_begin_date)FROM promotions )ANDpromo_category = 'INTERNET');B. SELECT promo_name, promo_begin_date FROM promotionsWHERE promo_begin_date IN (SELECT promo_begin_date)FROM promotionsWHERE promo_category = 'INTERNET');C. SELECT promo_name, promo_begin_date FROM promotionsWHERE promo_begin_date > ALL (SELECT promo_begin_dateFROM promotionsWHERE promo_category = 'INTERNET');D. SELECT promo_name, promo_begin_date FROM promotionsWHERE promo_begin_date > ANY (SELECT promo_begin_dateFROM promotionsWHERE promo_category = 'INTERNET'); Answer: C42.View the Exhibit and examine the data in the CUSTOMERS tableEvaluate the following query:SQL> SELECT cust_name AS "NAME", cust_credit_limit/2 AS MIDPOINT,MIDPOINT+100AS "MAX LOWER LIMIT" FROM customers;The above query produces an error on executionWhat is the reason for the error?A. An alias cannot be used in an expressionB. The alias NAME should not be enclosed within double quotation marksC. The MIDPOINT+100 expression gives an error because CUST_CREDIT _LIMIT contains NULL valuesD. The alias MIDPOINT should be enclosed within double quotation marks for the CUST_CREDIT_LIMIT/2 expressionAnswer: A43.View the Exhibit and examine the structure of the ORD tableEvaluate the following SQL statements that are executed in a user session in the specified order.What would be the outcome of the above statements?A. All the statements would execute successfully and the ORD_NO column would contain the value 2 for the CUST ID 101B. The CREATE SEQUENCE command would not execute because the minimum value and maximum value for the sequence have not been specifiedC. The CREATE SEQUENCE command would not execute because the starting value of the sequence and the increment value have not been specifiedD. All the statements would execute successfully and the ORD_NO column would have the value 20 for the CUST_ID 101 because the default CACHE value is 20Answer: A44.Using the CUSTOMERS table, you need to generate a report that shows 50% of each credit amount in each income level. The report should NOT show any repeated credit amounts in each income level.Which query would give the required result?A. SELECT cust_income_level, DISTINCT cust_credit_limit * 0.50AS "50% Credit Limit"FROM customers;B. SELECT DISTINCT cust_income_level, DISTINCT cust_credit_limit * 0.50AS "50% Credit Limit"FROM customers;C. SELECT DISTINCT cust_income level || ' ' || cust_credit_limit * 0.50AS "50% Credit Limit"FROM customers;D. S ELECT cust income level || ' ' || cust_credit_limit * 0.50 AS "50% Credit Limit"ROM customers;Answer: C45.View the Exhibit and examine the structure of the CUSTOMERS tableEvaluate the query statement:What would be the outcome of the above statement?A. It executes successfullyB. It produces an error because the condition on CUST_LAST NAME is invalidC. It executes successfully only if the CUST_CREDIT_LIMIT column does not contain any null valuesD. It produces an error because the AND operator cannot be used to combine multiple BETWEEN clausesAnswer: A。

ocp证书的类型 -回复

ocp证书的类型 -回复

ocp证书的类型-回复OCJP证书的类型引言:在软件开发行业,拥有专业的技能证书对于从业人员来说是非常重要的。

它不仅能够证明个人在某个特定领域的专业知识和技能,还能提高个人的竞争力和职业发展的机会。

在Java开发领域,Oracle公司提供了一系列的专业证书,其中最受欢迎和广泛认可的就是OCJP证书。

第一部分:什么是OCJP证书?OCJP,全称Oracle Certified Java Programmer,是由Oracle公司提供的针对Java开发人员的专业技能认证证书。

它通过考核个人对Java编程语言和开发平台的理解、应用和实践能力,来评估其在Java开发方面的专业水平。

第二部分:OCJP证书的类型OCJP证书被分为不同的级别和类型,以满足不同开发人员的需求和目标。

1. OCJP基础级别证书:OCJP基础级别证书主要是面向从事Java开发入门工作的人员。

它有助于初学者了解Java语言的基本概念、语法和编码规范。

该证书的目的是帮助开发人员建立一个扎实的Java编程基础,并将其应用于简单的开发项目中。

2. OCJP高级级别证书:OCJP高级级别证书是为具有一定Java开发经验的人员设计的。

它涵盖了更广泛的Java编程知识和技能,包括高级语法、设计模式、并发编程等。

该证书的目的是评估开发人员在复杂项目中应用高级Java编程概念和技术的能力。

3. 专业领域证书:除了基础级别和高级级别证书外,Oracle还提供了一些专业领域的OCJP证书,如企业级Java开发、Web开发和移动应用开发等。

这些证书旨在帮助开发人员深入了解特定领域的Java编程要求和最佳实践。

第三部分:如何获得OCJP证书要获得OCJP证书,开发人员需要完成以下几个步骤:1. 准备考试:在参加OCJP考试之前,开发人员需要充分准备。

可以通过参加培训课程、阅读相关书籍和文档、完成实践项目等方式来提高自己的技能水平。

2. 报名参加考试:一旦准备充分,就可以通过Oracle官方网站或授权的考试中心报名参加OCJP考试。

Oracle OCP题库

Oracle OCP题库一、单选题(67道)1.The instance abnormally terminates because of a power outage. Which statement is true about redo log files during instance recovery? (C)A.Inactive and current redo log files are required to accomplish recoveryB.Online and archived redo files are required to accomplish instance recoveryC.All redo log entries after the last checkpoint are applied from redo log files to data filesD.All redo log entries recorded in the current log file until the checkpoint position are applied to data files2.You want to move all objects of the APPS user in the test database to the DB_USR schema of the production database. Which option of IMPDP would you use to accomplish this task? (D)A.FULLB.SCHEMASC.TRANSFORMD.REMAP_SCHEMA3.You want to access employee details contained in flat files as part of the EMPLOYEE table. You plan to add a new column to the EMPLOYEE table to achieve this. Which data types would you use for the new column? (C)A.CLOBB.BLOBC.BFILED.LONG RAW4.Which statements listed below describe the data dictionary views? 1. These are stored in the SYSTEM tablespace 2. These are the based on the virtual tables 3. These are owned by the SYS user 4. These can be queried by a normal user only if O7_DICTIONARY_ACCESSIBLILITY parameter is set to TRUE5. The V$FIXED_TABLE view can be queried to list the names of these views (A)A.1 and 3B.2,3 and 5C.1,2, and 5D.2,3,4 and 55.In which situation may the UNDO_RETENTION parameter be ignored, even if it is set to a value? (C)A.When the data file of the undo tablespace is autoextensibleB.When there are more than one undo tablespace available in the databaseC.When the undo tablespace is of a fixed size and retention guarantee is not enabledD.When the undo tablespace is autoextensible and retention guarantee is not enabled6.Your database is open and the LISTENER listener is running. The new DBA of the system stops the listener by using the command: LSNRCTL> STOP What happens to the sessions that are presently connected to the database instance? (B)A.The sessions are able to perform only queriesB.The sessions are not affected and continue to function normallyC.The sessions are terminated and the active transactions are rolled backD.The sessions are not allowed to perform any operations till the listener is started7.A user, who is authenticated externally, logs in to a remote machine and connects to the database instance. What action would you take to ensure that a user cannot connect to the database instance by merely logging in to a remote machine? (C)A.Set REMOTE_OS_ROLES to FALSEB.Set OS_ROLES parameter to FALSEC.Set the REMOTE_OS_AUTHENT parameter to FALSED.Set the REMOTE_LOGIN_PASSWORD_FILE parameter to NONE8.You want to create a role to meet these requirements: 1. The role is to be protected from unauthorized usage. 2. The password of the role is not to be embedded in the application source code or stored in a table. Which method would you use to restrict enabling of such roles? (C)A.Create the role with external authentication.B.Create the role as a secure application role.C.Create the role as a password-protected role.D.Create a role and use Fine-Grained Access Control (FGAC) to secure the role.9.Note the following points describing various utilities in Oracle Database 11g: 1. It enables the transfer of data from one database to another 2. It provides a completesolution for the backup, restoration and recovery needs of the entire database 3. It enables the loading of data from an external file into tables of an Oracle Database 4. It provides a tape backup management for the Oracle ecosystem Which point describes the Oracle Data Pump utility? (A)A.1B.2C.3D.410.Your database is configured in shared server mode. However, your senior DBA asks you to modify the value of the PRIVATE_SGA limit in the profile of the users. What could be the reason for this? (A)A.To limit the User Global Area (UGA) memory allocated to a session from the SGAB.To limit the amount of memory to be used for the dispatcher queue of a session in SGAC.To limit the amount of memory to be used for the request pool in System Global Area (SGA)D.To control the amount of memory allocated in SGA for the local variables for each shared server process11.You configured the Flash Recovery Area for your database. The database instance has been started in ARCHIVELOG mode and the LOG_ARCHIVE_DEST_1 parameter is not set. What will be the implications on the archiving and the location of archive redo log files? (C)A.Archiving will be disabled because the destination for the redo log files is missingB.The database instance will shut down and the error details will be logged in the alert log fileC.Archiving will be enabled and the destination for the archived redo log file will be set to the Flash Recovery Area implicitlyD.Archiving will be enabled and the location for the archive redo log file will be created in the default location $ORACLE_HOME/log12. Which is the correct description of a pinned buffer in the database buffer cache? (A)A.The buffer is currently being accessedB.The buffer is empty and has not been usedC.The contents of the buffer have changed and must be flushed to the disk by the DBWn processD.The buffer is a candidate for immediate aging out and its contents are synchronized with the block contents on the disk13.In which situation would you use static database registration for a listener? (B)A.When multiple databases are to be registered with the listenerB.When DBAs need to connect remotely to start up the database instanceC.When users need to connect the database instance using the host naming methodD.When the database instance that is to be registered with the listener is configured in shared server mode14.While observing the index statistics, you find that an index is highly fragmented, thereby resulting in poor database performance. Which option would you use to reduce fragmentation without affecting the users who are currently using the index? (B)在观察索引统计数据时,发现索引高度分散,从而导致数据库性能不佳。

OracleOCP认证考试练习真题题库三

OracleOCP认证考试练习真题题库三说明:答案和解析在试卷最后第1部分:单项选择题,共20题,每题只有一个正确答案,多选或少选均不得分。

1.[单选题]Examine the description of the products tableName null? TypePROD_ID not null NUMBERPROD_NAME VARCHAR2(40)COST NUMBER(8,2)RELEASE_DATE DATEWhich query is valid?A)SELECT prod id,AVG(MAX (cost)) FROM products GROUP BY prod_idB)SELECT prod id, MAX (AVG (cost)) FROM products GROUP BY prod_idC)Select prod id, release date, SUM(cost) FROM products GROUP BY prod_idD)SELECT prod id, release date, SUM(cost) FROM products GROUP BY prod id, release_date2.[单选题]Examine the description of the SATES1 tableNAME NULL TYPESALES_ID NOT NULL NUMBERSTORE_ID NOT NULL NUMBERITEMS_ID NUMBERQUANTITY NUMBERSALES_DATE DATESATES2 is a table with the same description as SATES1,Some sales data is contained erroneously in both tables,You must display rows from SATES1 and SATES2 and wish to see the duplicates too,Which set operator generates the required output?A)MINUSB)UNION ALLC)SUBTRACTD)UNIONE)INTERSECT3.[单选题]Examine the description of the EMPLOYEES tableNIS_DATE FORMAT is set to DD-MON-YYWhich query requires explicit data type conversion?A)SELECT join date FROM employees WHERE join date >'10-02-2018';B)SELECT join date || ' '|| salary FROM employeesC)SELECT salary + '120.50' FROM employeesD)SELECT SUBSTR( join_date, 1, 2)-10 FROM employeesE)SELECT join date + '20' FROM employees4.[单选题]Your database instance is started with an SPFILEAPFILE is also availableYou execute this commandALTER SYSTEM SET DB CACHE SIZE=100KWhere is the value changed?A)in the SPFILE and PFTIEB)in the SPFILE, PFILE, and memoryC)only in the SPFILED)in the SPFILE and in memoryE)only in memory5.[单选题]View the Exhibits and examine the structure of the costs and PROMOTIONS tablesYou want to display PROD IDS whose promotion cost is less than the highest cost PROD ID in a promotion time intervalExamine this SQL statement:Select prod_id from costs where promo_id in(select promo_id from promotions where promo_costA)It executes successfully and gives the required result.B)It gives an error because the GROUP BY clause is not validC)It executes successfully but does not give the required resultD)It gives an error because the ALL keyword is not valid6.[单选题]In the spfile of a single instance database, LOCAL LISTENER is set to LISTENER 1.The TNSNAMES ORAfile in SORACLE HOME/network/admin in the database home contains:LISTENER 1 =(ADDRESS=(PROTOCOL= TCP)(HOST =host1 abc. com)(PORT=1521))Which statement is true?A)There are two listeners named LISTENER and LISTENER 1 running simultaneously using port 1521 on the same host as the database instancesB)The definition for LISTENER 1 requires a CONNECT DATAsection to enable dynamic service registrationC)LISTENER 1 must also be defined in the LISTENER. ORAfile to enable dynamic serviceRegistrationD)The LREG process registers services dynamically with the LISTENER_1 listenerE)Dynamic service registration cannot be used for this database instance7.[单选题]Which statement is true about database links?A)Adatabase link created in a database allows a connection from that database's instance to the target database's instance, but not vice versaB)Private database link creation requires the same user to exist in both the local and the remote databasesC)Apublic database link can be used by a user connected to the local database instance to connect to any schema in the remote database instanceD)Apublic database link can be created only by sysE)Adatabase link can be created only between two Oracle databases8.[单选题]The CUSTOMERS table has a CUST_LAST NAME column of data type VARCHAR2The table has two rows whose CUST_LAST NAME values are Anderson and AussonWhich query produces output for CUST_LAST NAME containing der for the first row and Aus for the second?A)SELECT REPLACE(SUBSTR(cust_last_name, -3),'AN', "O') FROM customers;B)SELECT INITCAPREPLACE(TRIM('SON FROM cust_last_namE.,'AN,'O')) FROM customers;C)SELECT REPLACE(TRIM(TRAILING "SON' FROM cust last namE.,'AN, 'O') FROM customersD)SELECT REPLACE(REPLACE(cust last name, ' son', ' '),'An', 'O') FROM customers;9.[单选题]What is true about non-equijoin statement performance?A)The join syntax used makes no difference to performance.B)The BETWEEN condition used with an non-equijoin sometimes performs better than usingThe >=and<= conditionsC)The BETWEEN condition used with an non-equijoin always performs better than when usingThe>=and <= conditionsD)The Oracle join syntax performs better than the sol: 1999 compliantANSI join syntaxE)The Oracle join syntax performs less well than the sol: 1999 compliantANSI join syntax10.[单选题]Examine the description of the PRODUCT INEORMATTON tableName Null7 Type-------------------------------- ------------- -----------------------------------PROD_ID NOT NULL NUMBER(2)PROD_NANE VARCHAR2(10)LIST_PRICE NUMBER(6,2Which query retrieves the number of products with a null list price?A)SELECT COUNT(list price)FROM product information WHERE list price NULLB)SELECT COUNT(list price) FROM product information WHERE list price Is NULL.C)SELECT COUNT(DISTINCT list price )PROM product information WHERE list price Is NULLD)SELECT COUNT(NVL(list price, 0)) FROM product information WHERE list price Is NULL11.[单选题]You execute this commandCREATE BIGFILE TABLESPACE big_tbsDATAFILE ' /u01/oracle/data/big_f1.dbf 'SIZE 20G;Sufficient storage is available in filesystem /u01Which two statements are true about the big_tbs Tablespace? (Choose twoA)AUTOEXTEND is possible for the datafileB)It must be bigger than the largest SMALLFILE tablespaceC)Additional data files may not be addedD)It will be a dictionary-managed tablespace by defaultE)It will always have a 32K block size12.[单选题]Which statement is true about the INTERSECT operator used in compoundQueries?A)Multiple INTERSECT operators are not possible in the same SQL statementB)It processes NULLS in the selected columnsC)INTERSECT is of lower precedence than UNION or UNIONALLD)It ignores NULLS13.[单选题]A database is configured to use automatic undo management with temporary undo enabled An UPDATE is executed on a temporary table. Where is the UNDO stored?A)in the undo tablespaceB)in the SYSAUX tablespaceC)in the SGAD)in the PGAE)in the temporary tablespace14.[单选题]You have been tasked to create a table for a banking application. One of the columns must meet three requirements:Be stored in a format supporting date arithmetic without using conversion functionsStore a loan period of up to10 yearsBe used for calculating interest for the number of days the loan remains unpaid WhichData type should you use?A)INTERVALYEARTOMONTHB)INTERVALDAYTOSECONDC)TIMESTAMPWITHLOCALTIMEZONED)TIMESTAMPE)TIMESTAMPWITHTIMEZONE15.[单选题]In the spfile of a single instance database, LOCALLISTENER is set to LISTENER.1 The TNSNAMES.ORA file in SORACLE HOME/network/admin in the database home containsLISTENER_ 1 =(ADDRESS=(PROTOCOL=TCP)(HOST=)(POPT=1521))Which statement is true?A)Dynamic service registration cannot be used for this database instanceB)The LREG process registers services dynamically with the LISTENER1 listenerC)LISTENER_1 must also be defined in the LISTENER.ORA file to enable dynamic service registrationD)There are two listeners named LISTENER and LISTENER1 running simultaneously using port 1521 on the same host as the database instancesE)The definition for LISTENER 1 requires a CONNECT DATA section to enable dynamic service16.[单选题]You want to write a query that prompts for two column names and the WHERE condition each time it Is executed in a session but only prompts for the table name the first time it is executed. The variables used in your query are never undefined in your sessionWhich query can be used?A)SELECT &&col1&&co2 FROM &table WHERE &&condition=&&condB)SELECT &col1&COI2 FROM &&table WHERE &conditionC)SELECT &col1&CO12 FROM &table WHERE &conditionD)ELECT &&col1&&co FROM &table WHERE &&condition=&condE)SELECT &&col1&&COL2 FROM &table WHER E&&condition17.[单选题]Examine the description of the CUSTOMERS tableName Null? Type--------------------------------- ----------------- ----------------------CUST_ID NOT NULL VARCHAR2(6)FIRST_NAME VARCHAR2(50)LAST_NAME NOT NULL VARCHAR2(50)ADDRESS VARCHAR2(50)CITY VARCHAR2(25)You want to display details of all customers who reside in cities starting with the letter D followed by at least two charactersWhich query can be used?A)SELECT * FROM customers WHERE city LIKE ‘D_%’;B)SELECT * FROM customers WHERE city = ‘%D_’;C)SELECT * FROM customers WHERE city LIKE ‘D_’;D)SELECT * FROM customers WHERE city = ‘D_%’;18.[单选题]You want to use table compression suitable for OLTP that will:1)Compress rows for all DML statements on that table2)Minimize the overheads associated with compressionWhich compression option is best suited for this?A)COLUMN STORE COMPRESS FOR QUERY LOWB)ROW STORE COMPRESS BASICC)COLUMN STORE COMPRESS FOR ARCHIVE LOWD)COLUMN STORE COMPRESS FOR ARCHIVE HIGHE)ROW STORE COMPRESS ADVANCED19.[单选题]Your data base instance is started with a PFILE.Examine these parameters:NAME TYPE VALUE----------------------------------- -------------------- -----------------------Memory_max_target big integer 0Memory_target big integer 0Sga_max_size big integer 2GSga_target big integer 2GYou want to increase the size of the buffer cache. Free memory is available to increase the Size of the buffer cache. You execute the command: SQL>ALTER SYSTEM SETDB_CACHE_SIZE=1024M;What is the outcome?A)The value is changed only in the PFILE and takes effect at the next instance startupB)The value is changed for the current instance and in the PFILEC)It fails because the SCOPE clause is missingD)Change is applied to the current instance, but does not persist after instance restart20.[单选题]Examine the description of the CUSTOMERS table:Name Null Type------------------------------------------------------------------------------------------CUST_ID NOT NULL NUMBERCUST_FIRST_NAME NOT NULL VARCHAR2(20)CUST_LAST_NAME NOT NULL VARCHAR2(30)CUST_INCOME_LEVEL VARCHAR2(30)CUST_CREDIT_LIMIT NUMBERFor customers whose income level has a value, you want to display the first name and due amount as 5% of their credit limit. Customers whose due amount is null should not be displayed.Which query should be used?A)SELECT cust_first_name, cust_credit_limit*.05ASDUE_AMOUNT FROM customers WHERE cust_incoms_level IS NOT NULL AND due_amount IS NOT NULL;B)SELECT cust_first_name,cust_cred it_limit*.05ASDUE_AMOUNT FROM customers WHERE cust_income_level!=NULL AND cust_cred it_level!=NULL;C)SELECT cust_first_name,cust_cred it_limit*.05ASDUE_AMOUN TFROM customers WHERE cust_income_level<>NULL AND due_amount<>NULL;D)SELECT cust_first_name,cust_cred it_limit*.05ASDUE_AMOUNT FROM customers WHERE cust_income_level!=NULL AND due_amount !=NULL;E)SELECT cust_first_name,cust_credit_limit*.05AS DUE_AMOUNT FROM customers WHERE cust_income_level ISNOT NULL AND cust_credit_limit IS NOT NULL;第2部分:多项选择题,共73题,每题至少两个正确答案,多选或少选均不得分。

Oracle_OCP11g考试题库

1.Which statement is true regarding the COALESCE function?A. It can have a maximum of five expressions in a listB. It returns the highest NOT NULL value in the list for all rowsC. It requires that all expressions in the list must be of the same data typeD. It requires that at least one of the expressions in the list must have a NOT NULL value Answer: C2.View the Exhibit and examine the structure of the PROMOTIONS table.Which SQL statements are valid? (Choose all that apply.)A. SELECT promo_id, DECODE (NVL(promo_cost,0), promo_cost,promo_cost * 0.25, 100) "Discount"FROM promotions;B. SELECT promo_id, DECODE (promo_cost, 10000,DECODE (promo_category, 'G1', promo_cost *.25, NULL), NULL) "Catcost"FROM promotions;C SELECT promo_id, DECODE(NULLIF(promo_cost, 10000), NULL, promo_cost*.25, 'N/A')"Catcost"FROM promotions;D. SELECTpromo_id,DECODE(promo_cost, >10000, 'High',<10000, 'Low') "Range"FROM promotions;Answer: A, B3.View the Exhibit and examine the structure of ORDERS and CUS TOMERS tables.There is only one customer with the cust _last_name column having value Roberts. Which INSERT statement should be used to add a row into the ORDERS table for the customer whose CUST LAST NAME is Roberts and CREDIT LIMIT is 600?A. INSERT INTO orders V ALUES (1, '10-mar-2007', 'direct',(SELECT customer_idFROM customersWHERE cust last name= 'Roberts' ANDcredit_limit=600), 1000);B. INSERT INTO orders (order_id,order_date,order_mode,(SELECT customer_idFROM customersWHERE cust last name= 'Roberts' ANDcredit_limit=600),order_total)V ALUES(1, '10-mar-2007', 'direct', &&customer_id, 1000);C. INSERT INTO(SELECT o.order_id, o.order_date,o.order_mode,c.customer_id, o.order_totalFROM orders o, customers cWHERE o.customer_id=c.customer_idAND c.cust_last_name='Roberts' ANDc.credit_limit=600 |V ALUES (1,'10-mar-2007', 'direct',(SELECT customer_idFROM customersWHERE cust_last_name= 'Roberts' AND credit_limit=600 ), 1000);D. INSERT INTO orders (order_id,order_date,order_mode,(SELECT customer_idFROM customersWHERE cust_last_name= 'Roberts' ANDcredit_limit=600),order_total)V ALUES(1,'10-mar-2007', 'direct', &customer_id, 1000);Answer: A4.View the Exhibit and examine the structure of the CUSTOMERS table.Evaluate the following SQL statementSQL> SELECT cust_city, COUNT(cust_last_name)FROM customersWHERE cust_credit_limit > 1000GROUP BY cust_cityHAVING A VG(cust_credit_limit) BETWEEN 5000 AND 6000;Which statement is true regarding the outcome of the above query?A. It executes successfullyB. It returns an error because the BETWEEN operator cannot be used in the HAVING clauseC. It returns an error because WHERE and HA VING clauses cannot be used in the same SELECT statementD. It returns an error because WHERE and HAVING clauses cannot be used to apply conditions on the same columnAnswer: A5.View the Exhibit and examine the structure of the PROMOTIONS table. Examine the following two SQL statements:Which statement is true regarding the above two SQL statements?A. statement 1 gives an error, statement 2 executes successfullyB. statement 2 gives an error, statement 1 executes successfullyC. statement 1 and statement 2 execute successfully and give the same outputD. statement 1 and statement 2 execute successfully and give a different output Answer: D6.Y ou created an ORDERS table with the following description:Y ou inserted some rows in the table. After some time, you want to alter the table by creating the PRIMARY KEY constraint on the ORD_ID column. Which statement is true in this scenario?A. Y ou cannot have two constraints on one columnB. Y ou cannot add a primary key constraint if data exists in the columnC. The primary key constraint can be created only at the time of table creationD. Y ou can add the primary key constraint even if data exists, provided that there are no duplicate values Answer: D7.When does a transaction complete? (Choose all that apply.)A. when a DELETE statement is executedB. when a ROLLBACK command is executedC. when a PL/SQL anonymous block is executedD. when a data definition language (DDL) statement is executedE. when a TRUNCATE statement is executed after the pending transact ionAnswer: B, D, E8.Y ou need to display the first names of all customers from the CUSTOMERS table that contain the character 'e' and have the character 'a' in the second last positionWhich query would give the required output?A. SELECT cust_first_nameFROM customersWHERE INSTR(cust_first_name, 'e') <>0 ANDSUBSTR(cust_first_name, -2, l) ='a';B. SELECT cust first nameFROM customersWHERE INSTR(cust_first_name, 'e') <>" ANDSUBSTR(cust_first_name, -2, l)='a';C. SELECT cust_first_nameFROM customersWHERE INSTR(cust_first_name, 'e') IS NOT NULL ANDSUBSTR(cust_first_name, l, -2)='a';D. SELECT cust_first_nameFROM customersWHERE INSTR(cust_first_name, 'e')<>0 ANDSUBSTR(cust_first_name, LENGTH(cust_first_name),-2)='a';Answer: A9.The ORDERS table belongs to the user OE. OE has granted the SELECT privilege on the ORDERS table to the user HR.Which statement would create a synonym ORD so that HR can execute the following query successfully? SELECT * FROM ord;A. CREATE SYNONYM ord FOR orders; This command is issued by OEB. CREA TE PUBLIC SYNONYM ord FOR orders; This command is issued by OEC. CREA TE SYNONYM ord FOR oe.orders; This command is issued by the database administratorD. CREATE PUBLIC SYNONYM ord FOR oe.orders; This command is issued by the database administratorAnswer: D10.View the Exhibit and examine the structure of the PRODUCTS tableY ou need to generate a report in the following format:Which two queries would give the required output? (Choose two.)A. SELECT prod_name || q"'s category is ' || prod_category CATEGORIESFROM products;B. SELECT prod_name || q'['s]'category is' || prod_category CATEGORIESFROM products;C. SELECT prod_name || q'\'s\' category is '|| prod_category CA TEGORIESD. SELECT prod_name ||q'<'s>'|| 'category is ' || prod_category CATEGORIESFROM products;Answer: C, D11.Which statement is true regarding the INTERSECT operator?A. It ignores NULL valuesB. Reversing the order of the intersected tables alters the resultC. The names of columns in all SELECT statements must be identicalD. The number of columns and data types must be identical for all SELECT statements in the queryAnswer: D12.Which two statements are true regarding the USING and ON clauses in table joins? (Choose two.)A. Both USING and ON clauses can be used for equijoins and nonequijoinsB. A maximum of one pair of columns can be joined between two tables using the ON clauseC. The ON clause can be used to join tables on columns that have different names but compatible data typesD. The WHERE clause can be used to apply additional conditions in SELECT statements containing the ON or the USING clauseAnswer: C, D13.Examine the structure of the PROGRAMS tableWhich two SQL statements would execute successfully? (Choose two.)A. SELECT NVL(ADD_MONTHS(END_DATE,l),SYSDA TE)FROM programs;B. SELECT TO_DA TE(NVL(SYSDATE-END_DATE,SYSDATE))FROM programs;C. SELECT NVL(MONTHS_BETWEEN(start_date,end_date),'Ongoing')FROM programs;D. SELECT NVL(TO_CHAR(MONTHS_BETWEEN(start_date,end_date)),'Ongoing')Answer: A, D14.Where can subqueries be used? (Choose all that apply.)A. field names in the SELECT statementB. the FROM clause in the SELECT statementC. the HAVING clause in the SELECT statementD. the GROUP BY clause in the SELECT statementE. the WHERE clause in only the SELECT statementF. the WHERE clause in SELECT as well as all DML statementsAnswer: A, B, C, F15.View the Exhibitsand examine the structures of the PRODUCTS, SAL ES, and CUSTOMERS tablesY ou need to generate a report that gives details of the customer's last name, name of the product, and the quantity sold for all customers in 'Tokyo'Which two queries give the required result? (Choose two.)A. SELECT c.cust_last_name,p.prod_name,s.quantity_soldFROM sales s JOIN products pUSING(prod_id)JOIN customers cB. SELECT c.cust_last_name, p.prod_name, s.quantity_soldFROM products p JOIN sales s JOIN customers cON(p.prod_id=s.prod_id)ON(s.cust_id=c.cust_id)WHERE c.cust_city='Tokyo';C. SELECT c.cust_last_name, p.prod_name, s.quantity_soldFROM products p JOIN sales sON(p.prod_id=s.prod_id)JOIN customers cON(s.cust_id=c.cust_id)AND c.cust_city='Tokyo';D. SELECT c.cust_id, c.cust_last_name, p.prod_id, p.prod_name, s.quantity_sold FROM products pJOIN sales sUSING(prod_id)JOIN customers cUSING(cust_id)WHERE c.cust_city='Tokyo';Answer: A, C16.View the Exhibit and evaluate the structure and data in the CUST_STATUS tableY ou issue the following SQL statementSQL> SELECT custno, NVL2(NULLIF(amt_spent,credit_limit), 0, 1000) "BONUS"FROM cust_status;Which statement is true regarding the execution of the above query?A. It produces an error because the AMT_SPENT column contains a null valueB. It displays a bonus of 1000forall customers whose AMT_SPENT is less than CREDIT_LIMITC. It displays a bonus of 1000 for all customers whose AMT_SPENT equals CREDIT_LIMIT, or AMT_SPENT is nullD. It produces an error because the TO_NUMBER function must be used to convert the result of the NULLIF function before it can be used by the NVL2 functionAnswer: C17.Examine the structure and data in the PRICE LIST tableY ou plan to give a discount of 25% on the product price and need to display the discount amount in the same format as the PROD_PRICE.Which SQL statement would give the required result?A. SELECT TO_CHAR(prod_price* .25, '$99,999.99')FROM PRICE_LIST;B. SELECT TO_CHAR(TO_NUMBER(prod_price)* .25, '$99,999.00')FROM PRICE_LIST;C. SELECT TO_CHAR(TO_NUMBER(prod_price, '$99,999.99')* .25,'$99,999.00') FROMPRICE_LIST;D. SELECT TO_NUMBER(TO_NUMBER(prod_price, $99,999.99')* .25,'$99,999.00')FROM PRICE_LIST;Answer: C18.Y ou need to generate a list of all customer last names with their credit limits from the CUSTOMERS table. Those customers who do not have a credit limit should appear last in the list.Which two queries would achieve the required result? (Choose two.)A. SELECT cust_last_name, cust_credit_limitFROM customersORDER BY cust_credit_limit DESC;B. SELECT cust_last_name, cust_credit_limitFROM customersORDER BY cust_credit_limit;C. SELECT cust_last_name, cust_credit_limitFROM customersORDER BY cust_credit_limit NULLS LAST;D. SELECT cust_last_name, cust_credit_limitFROM customersORDER BY cust_last_name, cust_credit_limit NULLSLAST;Answer: B, C19.Which two statements are true regarding the COUNT function? (Choose two.)A. The COUNT function can be used only for CHAR, V ARCHAR2, and NUMBER data typesB. COUNT (*) returns the number of rows including duplicate rows and rows containing NULL value in any of the columnsC. COUNT (cust_id) returns the number of rows including rows with duplicate customer IDs and NULL value in the CUST_ID columnD. COUNT(DISTINCT inv_amt) returns the number of rows excluding rows containing duplicates and NULL values in the INV_AMT columnE. A SELECT statement using the COUNT function with a DISTINCT keyword cannot have a WHERE clauseAnswer: B, D20.Which two statements are true regarding single row functions? (Choose two.)A. They accept only a single argumentB. They can be nested only to two levelsC. Arguments can only be column values or constantsD. They always return a single result row for every row of a queried tableE. They can return a data type value different from the one that is referencedAnswer: D, E21.View the Exhibit and examine the data in the COSTS table.Y ou need to generate a report that displays the IDs of all products in the COSTS table whose unit price is at least 25% more than the unit cost. The details should be displayed in the descending order of 25% of the unit cost.Y ou issue the following query:SQL>SELECT prod_idFROM costsWHERE unit_price >= unit_cost * 1.25ORDER BY unit_cost * 0.25 DESC;Which statement is true regarding the above query?A. It executes and produces the required resultB. It produces an error because an expression cannot be used in the ORDER By clauseC. It produces an error because the DESC option cannot be used with an expression in the ORDER BY clauseD. It produces an error because the expression in the ORDER BY clause should also be specified in the SELECT clauseAnswer: A22.View the Exhibit and examine the structure of the CUSTOMERS tableWhich statement would display the highest credit limit available in each income level in each city in the CUSTOMERS table?A. SELECT cust_city, cust_income_level, MAX(cust_credit_limit)FROM customersGROUP BY cust_city, cust_income_level, cust_credit_limit;B. SELECT cust_city, cust_income_level, MAX(cust_credit_limit)FROM customersGROUP BY cust_city, cust_income_level;C. SELECT cust_city, cust_income_level, MAX(cust_credit_limit)FROM customersGROUP BY cust_credit_limit, cust_income_level, cust_city;D. SELECT cust_city, cust_income_level, MAX(cust_credit_limit)FROM customersGROUP BY cust_city, cust_income_level, MAX(cust_credit_limit);Answer: B23.Which two statements are true regarding subqueries? (Choose two.)A. A subquery can retrieve zero or more rowsB. Only two subqueries can be placed atone levelC. A subquery can be used only in SQL query statementsD. A subquery can appear on either side of a comparison operatorE. There is no limit on the number of subquery levels in the WHERE clause of a SELECT statementAnswer: A, D24.View the Exhibit and examine the structure of the PROMOTIONS table.Evaluate the following SQL statement:The above querygenerates an error on execution.Which clause in the above SQL statement causes the error?A. WHEREB. SELECTC. GROUP BYD. ORDER BYAnswer: C25.Y ou need to create a table for a banking application One of the columns in the table has the following requirements:1) Y ou want a column in the table to store the duration of the credit period2) The data in the column should be stored in a format such that it can be easily added and subtracted with DATE data type without using conversion functions3) The maximum period of the credit provision in the application is 30days4) The interest has to be calculated for the number of days an individual has taken a credit for.Which data type would you use for such a column in the table?A. DATEB. NUMBERC. TIMESTAMPD. INTERV AL DAY TO SECONDE. INTERVAL YEAR TO MONTHAnswer: D26.View the Exhibit to examine the description for the SALES tableWhich views can have all DML operations performed on it? (Choose all that apply.)A. CREATE VIEW v3AS SELECT * FROM SALESWHERE cust_id = 2034WITH CHECK OPTION;B. CREATE VIEW vlAS SELECT * FROM SALESWHERE time_id <= SYSDA TE - 2*365WITH CHECK OPTION;C. CREATE VIEW v2AS SELECT prod_id, cust_id, time_id FROM SALESWHERE time id <= SYSDA TE -2*365WITH CHECK OPTION;D. CREATE VIEW v4AS SELECT prod_id, cust_id, SUM(quantity_sold) FROM SALESWHERE time id <= SYSDA TE -2*365GROUP BY prod_id, cust_idWITH CHECK OPTION;Answer: A, B27.Which is the valid CREATE TABLE statement?A. CREATE TABLE emp9$# (emp_no NUMBER(4));B. CREA TE TABLE 9emp$# (emp_no NUMBER(4));C. CREA TE TABLE emp*123 (emp_no NUMBER(4));D. CREATE TABLE emp9$# (emp_no NUMBER (4), date DATE);Answer: A28.View the Exhibit and examine the data in the PRODUCTS table.Y ou need to display product names from the PRODUCTS table that belong to the 'Software/Other' category with minimum prices as either $2000 or $4000 and no unit of measure.Y ou issue the following query:SQL>SELECT prod_name, prod_category, prod_min_priceFROM productsWHERE prod_category LIKE '%Other%' AND (prod_min_price = 2000 ORprod_min_price = 4000) AND prod_unit_of_measure <> ";Which statement is true regarding the above query?A. It executes successfully but returns no resultB. It executes successfully and returns the required resultC. It generates an error because the condition specified for PROD_UNIT_OF_MEASURE is not validD. It generates an error because the condition specified for the PROD_CATEGORY Column is not validAnswer: A29.View the Exhibit toexamine thedescription for theSALES andPRODUCTS tables.Y ou want to create aSALE _PROD viewby executing thefollowing SQLstatement:Which statement istrue regarding theexecution of theabove statement?A. The view will becreated and you can perform DML operations on the viewB. The view will be created but no DML operations will be allowed on the viewC. The view will not be created because the join statements are not allowed for creating a viewD. The view will not be created because the GROUP BY clause is not allowed for creating a view Answer: B30.Which three statements are true regarding the data types in Oracle Database 10g/11g? (Choose three.)A. Only one LONG column can be used per tableB. A TIMESTAMP data type column stores only time values with fractional secondsC. The BLOB data type column is used to store binary data in an operating system fileD. The minimum column width that can be specified for a VARCHAR2 data type column is oneE. The value for a CHAR data type column is blank-padded to the maximum defined column width Answer: A, D, E31.View the Exhibit and examine the structure of the PRODUCTS table.Evaluate the following query:What would be the outcome of executing the above SQL statement?A. It produces an errorB. It shows the names of all products in the tableC. It shows the names of products whose list price is the second highest in the tableD. It shows the names of all products whose list price is less than the maximum list priceAnswer: C32.View the Exhibit and examine the structure of ORD and ORD_ITEMS tables.The ORD_NO column is PRIMARY KEY in the ORD table and the ORD NO and ITEM_NO columns are composite PRIMARY KEY in the ORD ITEMS table.Which two CREA TE INDEX statements are valid? (Choose two.)A. CREATE INDEX ord_idxlON ord(ord_no);B. CREATE INDEX ord_idx2ON ord_items(ord_no);C. CREATE INDEX ord_idx3ON ord_items(item_no);D. CREATE INDEX ord_idx4ON ord,ord_items(ord_no, ord_date,qty);Answer: B, C33.Which statement is true regarding subqueries?A. The LIKE operator cannot be used with single-row subqueriesB. The NOT IN operator is equivalent to IS NULL with single-row subqueriesC. =ANY and =ALL operators have the same functionality in multiple-row subqueriesD. The NOT operator can be used with IN, ANY, and ALL operators in multiple-row subqueries Answer: D34.Y ou are currently located in Singapore and have connected to a remote database in Chicago.Y ou issue the following command:SQL> SELECT ROUND (SYSDA TE-promo_begin_date, 0)FROM promotionsWHERE (SYSDATE-promo_begin_date)/365 >2;PROMOTIONS is the public synonym for the public database link for the PROMOTIONS table. What is the outcome?A. an error because the ROUND function specified is invalidB. an error because the WHERE condition specified is invalidC. number of days since the promo started based on the current Chicago date and timeD. number of days since the promo started based on the current Singapore date and time Answer: C35.View the Exhibit and examine the structure of the PRODUCTS table.Using the PRODUCTS table, you issue the following query to generate the names, current list price, and discounted list price for all those products whose list price falls below $10 after a discount of 25% is applied on it.SQL>SELECT prod_name, prod_list_price,prod_list_price-(prod_list_price*.25) "DISCOUNTED_PRICE"FROM productsWHERE discounted_price < 10;The query generates an error.What is the reason for the error?A. The parenthesis should be added to enclose the entire expressionB. The double quotation marks should be removed from the column aliasC. The column alias should be replaced with the expression in the WH ERE clauseD. The column alias should be put in uppercase and enclosed within double quotation marks in the WHERE clauseAnswer: C36.View the Exhibit for the structure of the STUDENT and FACULTY tables.Y ou need to display the faculty name followed by the number of students handled by the faculty at the base location.Examine the following two SQL statements:Which statement is true regarding the outcome?A. Only statement 1 executes successfully and gives the required resultB. Only statement 2 executes successfully and gives the required resultC. Both statements 1 and 2 execute successfully and give different resultsD. Both statements 1 and 2 execute successfully and give the same required resultAnswer: D37.View the Exhibitand examine thestructure ofCUSTOMERS andSALES tables.Evaluate thefollowing SQLstatement:Which statement istrue regarding theexecution of theabove UPD ATE statement?A. It would not execute because two tables cannot be used in a single UPDATE statementB. It would not execute because the SELECT statement cannot be used in place of the table nameC. It would execute and restrict modifications to only the columns specified in the SELECT statementD. It would not execute because a subquery cannot be used in the WHERE clause of an UPDATE statement Answer: C38.Evaluate the following query:SQL> SELECT TRUNC(ROUND(156.00,-1),-1)FROM DUAL;What would be the outcome?A. 16B. 100C. 160D. 200E. 150Answer: C39.View the Exhibits and examine the structures of the PROMOTIONS and SALES tables.Evaluate the following SQL statement:Which statement is true regarding the output of the above query?A. It gives the details of promos for which there have been salesB. It gives the details of promos for which there have been no salesC. It gives details of all promos irrespective of whether they have resulted in a sale or notD. It gives details of product 105 that have been sold irrespective of whether they had a promo or not Answer: C40.View the Exhibit and examine the description of SALES and PROMOTIONS tablesY ou want to delete rows from the SALES table, where the PROMO_NAME column in the PROMOTIONS table has either blowout sale or everyday low price as valuesWhich DELETE statements are valid? (Choose all that apply.)A. DELETEFROM salesWHERE promo_id = (SELECT promo_idFROM promotionsWHERE promo_name = 'blowout sale' )AND promo_id = (SELECT promo_idFROM promotionsWHERE promo_name = 'everyday low price' );B. DELETEFROM salesWHERE promo_id = (SELECT promo_idFROM promotionsWHERE promo_name = 'blowout sale' )OR promo_id = (SELECT promo_idFROM promotionsWHERE promo_name = 'everyday low price' );C. DELETEFROM salesWHERE promo_id IN (SELECT promo_idFROM promotionsWHERE promo_name = 'blowout sale' )OR promo_name = 'everyday low price' );D. DELETEFROM salesWHERE promo_id IN (SELECT promo_idFROM promotionsWHERE promo_name IN ('blowout sale', 'everyday low price' )); Answer: B, C, D41.View the Exhibit and examine the structure of the PROMOTIONS table.Y ou have to generate a report that displays the promo name and start date for all promos that started after the last promo in the' INTERNET' category.Which query would give you the required output?A. SELECT promo_name, promo_begin_date FROM promotionsWHERE promo_begin_date > ALL (SELECT MAX(promo_begin_date)FROM promotions )ANDpromo_category = 'INTERNET');B. SELECT promo_name, promo_begin_date FROM promotionsWHERE promo_begin_date IN (SELECT promo_begin_date)FROM promotionsWHERE promo_category = 'INTERNET');C. SELECT promo_name, promo_begin_date FROM promotionsWHERE promo_begin_date > ALL (SELECT promo_begin_dateFROM promotionsWHERE promo_category = 'INTERNET');D. SELECT promo_name, promo_begin_date FROM promotionsWHERE promo_begin_date > ANY (SELECT promo_begin_dateFROM promotionsWHERE promo_category = 'INTERNET');Answer: C42.View the Exhibit and examine the data in the CUSTOMERS tableEvaluate the following query:SQL> SELECT cust_name AS "NAME", cust_credit_limit/2 AS MIDPOINT,MIDPOINT+100AS "MAX LOWER LIMIT"FROM customers;The above query produces an error on executionWhat is the reason for the error?A. An alias cannot be used in an expressionB. The alias NAME should not be enclosed within double quotation marksC. The MIDPOINT+100 expression gives an error because CUST_CREDIT _LIMIT contains NULL valuesD. The alias MIDPOINT should be enclosed within double quotation marks for theCUST_CREDIT_LIMIT/2 expressionAnswer: A43.View the Exhibit and examine the structure of the ORD tableEvaluate the following SQL statements that are executed in a user session in the specified order.What would be the outcome of the above statements?A. All the statements would execute successfully and the ORD_NO column would contain the value 2 for the CUST ID 101B. The CREATE SEQUENCE command would not execute because the minimum value and maximum value for the sequence have not been specifiedC. The CREATE SEQUENCE command would not execute because the starting value of the sequence and the increment value have not been specifiedD. All the statements would execute successfully and the ORD_NO column would have the value 20 for the CUST_ID 101 because the default CACHE value is 20Answer: A44.Using the CUSTOMERS table, you need to generate a report that shows 50% of each credit amount in each income level. The report should NOT show any repeated credit amounts in each income level.Which query would give the required result?A. SELECT cust_income_level, DISTINCT cust_credit_limit * 0.50AS "50% Credit Limit"FROM customers;B. SELECT DISTINCT cust_income_level, DISTINCT cust_credit_limit * 0.50AS "50% Credit Limit"FROM customers;C. SELECT DISTINCT cust_income level || ' ' || cust_credit_limit * 0.50AS "50% Credit Limit"FROM customers;D. SELECT cust income level || ' ' || cust_credit_limit * 0.50 AS "50% Credit Limit"ROM customers;Answer: C45.。

ocp 中文 试题

ocp 中文试题
对于Oracle Certified Professional (OCP)中文试题,由于Oracle认证考试是全球性的,通常会涉及到英文原题。

但也有一些OCP中文试题可供参考,这些试题通常是由一些培训机构或教育机构提供的模拟试题。

以下是一些OCP中文试题的示例:
1. 请解释Oracle数据库中数据块的结构,并说明其作用。

2. 请说明如何使用Oracle SQL语句查询表中的数据。

3. 请说明在Oracle数据库中如何使用存储过程来封装复杂的业务逻辑。

4. 请说明在Oracle数据库中如何使用触发器来自动执行某些操作。

5. 请解释Oracle数据库中的分区表和分区索引的概念,并说明其优点。

6. 请说明如何使用Oracle数据库中的视图来抽象化数据结构。

7. 请说明Oracle数据库中的游标的概念、用途和工作原理。

8. 请说明如何在Oracle数据库中使用存储过程来调用Java程序。

9. 请说明如何配置和管理Oracle数据库中的用户和权限。

10. 请说明Oracle数据库中常用的数据类型,并比较它们的特点和使用场景。

以上试题仅供参考,实际情况可能会根据具体的OCP认证级别和考试内容而有所不同。

为了获取更准确的OCP中文试题,建议查阅相关官方教材或与OCP培训机构联系,获取最新的模拟试题和资料。

  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。

一、OCP认证简介 (1)二、OCP认证的途径: (1)三、如何参加考试? (2)四、OCP报考流程: (2)五、如何准备考试及考试成绩查询方式? (2)六、获得OCP认证的好处 (5)七、OCP认证的常见问答 (6)八、如何预约考试&考试所需证件 (10)一、OCP认证简介OCP是由Oracle公司颁布并实施的一项权威的专业技术标准,它是专为认证那些能够满足对ORACLE核心产品的服务与支持,并具有娴熟的操作能力与广泛理论知识的专业人士。

一经认证,在行业内的专业资格将被确认,从而使个人或企业更具竞争实力。

Oracle认证专家——OCP,是由Oracle公司授权国际考试认证中心对考生进行的资格认证。

考生按考试标准要求参加几门课程的考试(一般为3—5门),在通过全部考试后,便可获得OCP的专家认证。

二、OCP认证的途径:10g 认证途径:10g OCA(1z0-007、1z0-047、1z0-051)+1z0-042=oca10gocp:oca+1门课程training +1z0-043 =ocp10gocm:10gocp+2门课程training 。

11g认证考试途径:11g OCA:(1z0-007、1z0-051、1z0-047)+ 1z0-05211g OCP:OCA + 1z0-053 +一门原厂培训相关课程:1z0-007 Introduction to Oracle9i: SQL1z0-052 Oracle Database 11g: Administration I1z0-053 Oracle Database 11g: Administration II1z0-051 Oracle Database 11g: SQL Fundamentals I1z0-047 Oracle Database SQL Expert三、如何参加考试?(1)考试方式:OCP认证的所有考试也是通过Prometric公司组织的,具体的考试事宜请访问它的官方网站:(2)报考条件:参加OCP考试前必须获取OCA认证(3)考试费用:目前OCP每门考试的费用约为人民币1125元/门(125美元/门)。

四、OCP报考流程:参加考试的话,首先要通过正规途径购买考试券。

因为考试券是电子版的,仅仅是一个使用号码,很可能被盗用或者已经被使用,所以要谨防上当受骗。

考试券只能一人用一次参加一门考试,有效期12个月,过期自动作废。

考试可以到当地所在的Prometric 考试中心参加,考场查询的网址是 。

一般要参加考试的话,提前2~3天和考场预约一下考试时间即可。

通过042考试可以获得10g OCA证书,再通过043考试并且参加一门OU的原厂培训,即可获得10g OCP证书。

考试和培训没有先后顺序要求,可以由学员自行安排。

证书必须按照先OCA,后OCP,再OCM的顺序才可获得。

数据库的OCP认证要求学员在通过相应的考试之外还必须参加至少一门的原厂培训。

培训费用视学员所选择的相关课程而定。

其实OCA、OCP、OCM只是Oracle的认证级别,所涉及的产品很多。

一般学员说的OCA、OCP都是指数据库方面的认证。

现在Oracle提供的数据库的认证主要涉及的产品有9i、10g和11g。

现在拿的比较多的都是9i和10g的认证。

10g OCP总共要求学员通过2门考试+一门原厂培训原厂考券售价:042——1121元;043——1121元其中通过前面一门考试可以获得10g OCA证书五、如何准备考试及考试成绩查询方式?1、Oracle公司推荐的官方准备途径一般来讲,Oracle的考试内容比较多,并且考题也很细,对动手能力要求很强。

因此,为了有足够的把握,一定要提前充分准备,而且一定要注重动手实践。

在Oracle官方网站(/cn/index.html )上推荐的通过认证的途径如下,可以进行参考。

Oracle大学:Oracle大学提供的教师引导及基于技术的训练(Instructor-led training and technology- based training)是准备OCP认证的最好方式,这些课程将为你打下需要通过OCP认证的知识基础。

你可以查阅一下课程表来选择理想的准备方式,你当地的Oracle 大学可以在这方面给你一些最好的建议。

你可以访问Oracle的网站,获得更多的信息。

自己准备:实战经验是加深你对Oracle考试内容理解的最好方式。

Oracle建议你将理论学习拓展,在实际工作或是练习中使用新学到的技巧和知识来自学。

考试内容检查表:使用考试内容检查表(Test Content Checklist)来确定你必须准备的所有题目。

Oracle会不断地更新考试内容检查表,所以请访问Oracle网站/education/certification,下载最新的考试指南。

其它考试工具:模拟考试题及自我测试软件可以帮助你更好地准备OCP认证考试。

Oracle和自我测试软件公司(Self Test Software)联合出品了一些高质量的考试软件以帮助考生更好地准备OCP认证考试,这些软件可以通过 Oracle 网站/education/certification定购。

事实上,绝大部分的大陆同学都是通过参加培训班来准备考试的,它们不仅辅导通过考试的知识,而且其他信息包括如何报名,考场上如何应考,都可以得到辅导。

以上Oracle 官方的介绍只是一般地对你进行一下有关备考的初级教育,事实上,正像我们前面说过的,作为一个庞大的数据库系统,要想掌握好Oracle(更不要说完全掌握了——我甚至怀疑是否有人真正完全掌握过Oracle),从任何角度而言都不是一件易事。

除非你有足够的决心和耐心,准备将Oracle当作你的职业之路并致力于数据库技术的研究,你才有可能真正了解这个庞杂系统的精髓。

以下的一些论述将有助于你对Oracle有一个初步的了解。

2、Oracle数据库技术基本知识(1)Oracle数据库涵盖了数据库技术的方方面面。

尽管关系型数据库从原理上来讲并不是很难,有一些数据库知识的人掌握这些原理并不会花很大的气力,而且,一般的关系型数据库软件,譬如 SQL Server,用起来并不复杂,但Oracle绝对与众不同。

作为有史以来最成功的关系型数据库软件,Oracle的实现方式和管理维护手段非常丰富,它涉及到很多方面的细节技术。

单从任何一个侧面来理解它,是难观其全貌的。

要想真的精通它,没有两三年功夫是不行的。

单是Oracle的技术文档,就足够淹没你的! 具体说来,Oracle技术包括以下几个主要方面:Oracle系统结构和原理、Oracle 数据库的安装和配置、Oracle数据库的管理、Oracle的数据备份与恢复技术、Oracle的性能调整、Oracle的新产品特性(Java支持、应用服务器、时间空间系列、文本服务等)、Oracle的并行服务器技术、Oracle的数据仓库技术、Oracle的对象类型和对象一关系模型等技术。

毫不夸张地说,以上任何一个部分单独拿出来都是很大的题目!(2)Oracle技术发展快,技术的关联性大。

尽管Oracle只是一个数据库系统,但在实际应用中,你不可能只面对数据库本身。

譬如,你在做Oracle数据库的网络管理,你将不可避免地遇到如何与网络通讯、防火墙的技术兼容的问题。

同理,你在做其它方面的工作,也肯定有方方面面的技术关联问题需要解决。

而且更要命的是,这些技术(包括Oracle本身)发展速度都非常快,这就使得跟上它们的发展成为一件十分费劲的事情。

不过幸运的是,我们并不需要同时了解Oracle的所有方面,Oracle提供了很多应用方向,我们可以按照偏好,选择其中的一个方向,集中时间和精力,努力在这个方向做到有所成就还不是一件很难的事情。

由于Oracle目前已是世界上最主要的数据库供应商和第二大软件公司,Oracle的数据库技术已经被广泛应用于各个领域,因而市场上对Oracle人才的需求量是相当之大,获得OCP认证不愁找不到工作。

而以后我们可以在工作中学以致用,再努力地钻研Oracle数据库及相关技术。

3、入门者如何起步?说了这么多,想必您可能已经有些心动,那么,面对Oracle这样一个庞然大物,你也许会觉得无从下手。

为此,我们有一些建议:(1)找一本有关数据库原理的书,掌握关系数据库的基本原理——如果你没有学过这样的课程的话。

(2)阅读参考书并结合上机操作,掌握SQL的一般原理及基本用法。

(3)至少买一本Oracle入门级的参考书,并找到一台安装了Oracle的某个版本(Oracle7.3以上,最好是 Oracle 8)计算机,建立起上机学习环境。

其中第三点尤其重要,因为没有实践经验,想通过Oracle认证只是痴人说梦。

或者如果你的预算比较充分,你可以选择参加培训。

在选择培训班的时候一定要选择Oracle授权的培训班,这样培训的质量才有保证,同时,在报名考试的时候还可以享受一定的折扣。

与其他很多考试不同,OCP并没有真正意义上的参考书,你要做的就是在上机中不断熟悉Oracle的各种应用,书只是用来查阅和参考的。

因为从根本上来讲,Oracle数据库是一门实践性很强的技术,而Oracle认证主要考的是动手能力。

因此,没有实践经验,而只靠背学习资料是根本无法通过Oracle认证考试的。

以下是市面上常见的一些书,在此列出,希望能对大家有一些帮助。

初级的参考资料:《轻松掌握SQL结构化查询语言》,《轻松掌握Oracle数据库开发》,《Oracle开发指南》,《Oracle初学者指南》,《Oracle8 PL/SQL程序设计》。

高级的;《Oracle服务器技术精粹》,《Oracle8/8i开发使用手册》,《Oracle8份与恢复手册》,《Oracle8性能优化与管理手册》。

成绩查询方式VUE网站考试成绩查询方法第一步:输入VUE确认网址-/authenticate分别输入成绩单上提供的Registration Number和Validation Number点击继续第二步:看到pass了吗 OKExam Date: 考试时间Candidate: 考生姓名Candidate ID: 考生ID号(很有用的)Registration #: 注册号Exam Series: (考试科目代号)Exam: (考试科目名称)Validation #: 验证号Grade: pass()-----------------------------------------------------------------------------------------------------------Prometric网站考试成绩查询方法:(注:考后3天才查得到)一。

相关文档
最新文档