OCP-1Z0-051

2024/4/26 10:22:08

OCP-1Z0-051 补充题库 第16题 rownum的用法

一、原题 Examine the structure of the STUDENTS table: You need to create a report of the 10 students who achieved the highest ranking in the course INT SQL and who completed the course in the year 1999. Which SQL statement accomplishes this task? A. SEL…

OCP-1Z0-051 补充题库 第8题 子查询的使用范围

一、原题 Where can sub queries be used? (Choose all that apply) A. field names in the SELECT statement B. the FROM clause in the SELECT statement C. the HAVING clause in the SELECT statement D. the GROUP BY clause in the SELECT statement E. the WHERE cla…

OCP-1Z0-051 第107题 AVG,MAX,MIN组函数的使用

一、原题 View the Exhibit and examine the structure and data in the INVOICE table. Which two SQL statements would execute successfully? (Choose two.) A. SELECT AVG(inv_date ) FROM invoice; B. SELECT MAX(inv_date),MIN(cust_id) FROM invoic…

OCP-1Z0-051 第26题 oracle对象命名规则

一、原题 Which is the valid CREATE 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); 答案:…

OCP-1Z0-051 第42题 视图的注意事项

一、原题 Which three statements are true regarding views? (Choose three.) A. Views can be created only from tables. B. Views can be created from tables or other views. C. Only simple views can use indexes existing on the underlying tables. D. Both simple…

OCP-1Z0-051 第132题 LEFT OUTER JOIN,RIGHT OUTER JOIN,FULL OUTER JOIN的用法

一、原题 View the Exhibit and examine the structure of the SALES and PRODUCTS tables. In the SALES table, PROD_ID is the foreign key referencing PROD_ID in the PRODUCTS table, You want to list each product ID and the number of times it has been sold. Eval…

OCP-1Z0-051 第130题 LEFT OUTER JOIN的用法

一、原题 View the Exhibit and examine the data in the EMPLOYEES table: You want to display all the employee names and their corresponding manager names. Evaluate the following query: SQL> SELECT e.employee_name "EMP NAME", m.employee_name &q…

OCP-1Z0-051 第119题 GROUP BY,HAVING子句的顺序

一、原题 Examine the data in the ORD_ITEMS table: ORD_NO ITEM_NO QTY   1 111 10   1 222 20   1 333 30   2 333 30   2 444 40   3 111 40 Evaluate the following query: SQL>SELECT item_no, AVG(qty) FROM ord_items …

OCP-1Z0-051 第120题 NATURAL JOIN自然连接

一、原题 View the Exhibits and examine the structures of the PRODUCTS, SALES, and CUSTOMERS tables.You issue the following query: SQL>SELECT p.prod_id,prod_name,prod_list_price, quantity_sold,cust_last_name FROM products p NATURAL JOIN sal…

OCP-1Z0-051 第81题 SYSDATE函数

一、原题 You 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 promotions WHERE (SYSDATE-promo_begin_date)/365 > 2; PROMOTIONS i…

OCP-1Z0-051 补充题库 第28题 Date类型

一、原题 Which two statements are true regarding working with dates? (Choose two.) A. The default internal storage of dates is in the numeric format B. The RR date format automatically calculates the century from the SYSDATE function but allows the user …

OCP-1Z0-051 第172题 事务savepoint的注意事项

一、原题 The SQL statements executed in a user session are as follows: SQL> CREATE TABLE product (pcode NUMBER(2), pname VARCHAR2(10)); SQL> INSERT INTO product VALUES (1, pen); SQL> INSERT INTO product VALUES (…

OCP-1Z0-051 第14题 DISTINCT去重

一、原题 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 …

OCP-1Z0-051 第129题 RIGHT OUTER JOIN的使用

一、原题 View the Exhibits and examine the structures of the PROMOTIONS and SALES tables. Evaluate the following SQL statement: SQL>SELECT p.promo_id, p.promo_name, s.prod_id FROM sales s RIGHT OUTER JOIN promotions p ON (s.promo_id p.promo_id); Whic…

OCP-1Z0-051 第17题 null参与运算后仍是null

一、原题 View the Exhibit and examine the data in the EMPLOYEES table. You want to generate a report showing the total compensation paid to each employee to date. You issue the following query: SQL> SELECT ename|| joined on ||hiredate|| …

OCP-1Z0-051 补充题库 第33题 sql*plus命令

一、原题 Which are /SQL*Plus commands? (Choose all that apply.) A. INSERT B. UPDATE C. SELECT D. DESCRIBE E. DELETE F. RENAME 答案: D 二、题目翻译 下面哪个是SQL*Plus命令?(选择所有合适的选项) 三、题目解析 只有describe是sql*plus命令,其它的都…

OCP-1Z0-051 补充题库 第30题 oracle中的NULL值

一、原题 View the Exhibit and examine the description for the CUSTOMERS table. You want to update the CUST_CREDIT_LIMIT column to NULL for all the customers, where CUST_INCOME_LEVEL has NULL in the CUSTOMERS table. Which SQL statement will accomplish the…

OCP-1Z0-051 第54题

一、原题 View the Exhibit and examine the structure of the CUSTOMERS table. Evaluate the query statement: SQL> SELECT cust_last_name, cust_city, cust_credit_limit FROM customers WHERE cust_last_name BETWEEN A AND C …

OCP-1Z0-051 第19题 INTERVAL用法

一、原题 Evaluate the following query: SELECT INTERVAL 300 MONTH, INTERVAL 54-2 YEAR TO MONTH, INTERVAL 11:12:10.1234567 HOUR TO SECOND FROM dual; What is the correct output of the above query? A. …

OCP-1Z0-051 第76题 INSTR和SUBSTR函数

一、原题 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 position. Which query would give the required output? A. SELECT cust_first_name FROM cu…

OCP-1Z0-051 补充题库 第34题 COUNT函数

一、原题 Which two statements are true regarding the COUNT function? (Choose two.) A. COUNT(*) returns the number of rows including duplicate rows and rows containing NULL value in any of the columns B. COUNT(cust_id) returns the number of rows including…

OCP-1Z0-051 第158题 select... for update语句注意事项

一、原题 Which statements are true regarding the FOR UPDATE clause in a SELECT statement? (Choose all that apply.) A. It locks only the columns specified in the SELECT list. B. It locks the rows that satisfy the condition in the SELECT statement. C. It c…

OCP-1Z0-051 第174题 事务的组成

一、原题 Which statement is true regarding transactions? (Choose all that apply.) A. A transaction can consist only of a set of DML and DDL statements. B. A part or an entire transaction can be undone by using ROLLBACK command. C. A transaction consists …

OCP-1Z0-051 第167题 DELETE语句注意事项

一、原题 Evaluate the following DELETE statement: DELETE FROM sales; There are no other uncommitted transactions on the SALES table. Which statement is true about the DELETE statement? A. It would not remove the rows if the table has a primary key. B. It…

OCP-1Z0-051 第98题 COALESCE函数的用法

一、原题 Which statement is true regarding the COALESCE function? A. It can have a maximum of five expressions in a list. B. It returns the highest NOT NULL value in the list for all rows. C. It requires that all expressions in the list must be of the sa…

OCP-1Z0-051 第21题 LONG类型

一、原题 Examine the description of the EMP_DETAILS table given below: name NULL TYPE EMP_ID NOT NULL NUMBER EMP_NAME NOT NULL VARCHAR2 (40) EMP_IMAGE LONG Which two statements are true regarding …

OCP-1Z0-051 第43题 序列的cycle选项

一、原题 Evaluate the following CREATE SEQUENCE statement: CREATE SEQUENCE seq1 START WITH 100 INCREMENT BY 10 MAXVALUE 200 CYCLE NOCACHE; The SEQ1 sequence has generated numbers up to the maximum limit of 200. You issue the following SQL statement: SELEC…

OCP-1Z0-051 第53题 日期格式

一、原题 View the Exhibit and examine the data in the PROMOTIONS table. PROMO_BEGIN_DATE is stored in the default date format, dd-mon-rr. You need to produce a report that provides the name, cost, and start date of all promos in the POST category that wer…

OCP-1Z0-051 第35题 主外键规则

一、原题 Which two statements are true regarding constraints? (Choose two.) A. A table can have only one primary key and one foreign key. B. A table can have only one primary key but multiple foreign keys. C. Only the primary key can be defined at the col…

OCP-1Z0-051 第116题 GROUP BY,HAVING子句应用

一、原题 Examine the data in the ORD_ITEMS table: ORD_NO ITEM_NO QTY 1 111 10 1 222 20 1 333 30 2 333 30 2 444 40 3 111 …

OCP-1Z0-051 第109题 聚合函数的使用

一、原题 Examine the structure of the MARKS table: Name Null Type STUDENT_ID NOT NULL VARCHAR2(4) STUDENT_NAME VARCHAR2(25) SUBJECT1 NUMBER(3) SUBJECT2 …

OCP-1Z0-051 第106题 COALESCE,DECODE,NVL,NULLIF函数的使用

一、原题 Examine the data in the LIST_PRICE and MIN_PRICE columns of the PRODUCTS table: LIST_PRICE MIN_PRICE 10000 8000 20000 30000 30000 Which two expressions give the same output? (Choose two.) A. NVL(NULLIF(list_price, min_price)…

OCP-1Z0-051 第13题 q操作符

一、原题 View the Exhibit and examine the structure of the PRODUCTS table. You need to generate a report in the following format:CATEGORIES5MP Digital Photo Cameras category is PhotoY Boxs category is ElectronicsEnvoy Ambassadors category is HardwareWhich…

OCP-1Z0-051 第160题 insert中使用子查询

一、原题 View 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 …

OCP-1Z0-051 第65题 order by降序排序

一、原题 View the Exhibit and examine the structure of the CUSTOMERS table. You have been asked to produce a report on the CUSTOMERS table showing the customers details sorted in descending order of the city and in the descending order of their income le…

OCP-1Z0-051 补充题库 第12题 oracle函数分类

一、原题 Which four are types of functions available in SQL? (Choose 4) A. string B. character C. integer D. calendar E. numeric F. translation G. date H. conversion Answer: B,E,G,H二、题目翻译 下面哪四种是SQL中的函数类型?(选四个) A.字符串 B.字符类型 …

OCP-1Z0-051 第147题 CASE..WHEN的使用

一、原题 View the Exhibit and examine the structure of the PROMOTIONS table. Evaluate the following SQL statement: SQL>SELECT promo_name, CASE WHEN promo_cost > (SELECT AVG(promo_cost) FROM…

OCP-1Z0-051 第139题 子查询的注意事项

一、原题 Which three statements are true about multiple-row subqueries? (Choose three.) A. They can contain a subquery within a subquery. B. They can return multiple columns as well as rows. C. They cannot contain a subquery within a subquery. D. They ca…

OCP-1Z0-051 第33题 create table 建表语句

一、原题 You want to create an ORD_DETAIL table to store details for an order placed having the following business requirement: 1) The order ID will be unique and cannot have null values. 2) The order date cannot have null values and the default should be …

OCP-1Z0-051 第45题 SEQUENCE(序列)的注意事项

一、原题 Which two statements are true about sequences created in a single instance database? (Choose two.) A. The numbers generated by a sequence can be used only for one table. B. DELETE <sequencename> would remove a sequence from the database. C…

OCP-1Z0-051 补充题库 第32题 ALL、ANY、IN

一、原题 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 …

OCP-1Z0-051 第155题 集合操作UNOIN

一、原题 Evaluate the following SQL statement: SQL>SELECT promo_id, promo_category FROM promotions WHERE promo_category Internet ORDER BY 2 DESC UNION SELECT promo_id, promo_category FROM promotions WHERE promo_categ…

OCP-1Z0-051 第49题 SYNONYM同义词

一、原题 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 SYN…

OCP-1Z0-051 第143题 子查询中ANY、ALL的应用

一、原题 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 t…

OCP-1Z0-051 补充题库 第4题 聚合函数的使用

一、原题 See the Exhibit and examine the structure and data in the INVOICE table: Exhibit: Which two SQL statements would executes successfully? (Choose two.) A. SELECT MAX(inv_date),MIN(cust_id) FROM invoice; B. SELECT MAX(AVG(SYSDATE - inv_date)) FROM…

OCP-1Z0-051 第10题

一、原题 View the Exhibit; examine the structure of the PROMOTIONS table.Each promotion has a duration of at least seven days.Your manager has asked you to generate a report, which provides the weekly cost for each promotion done to l date.Which query wou…

OCP-1Z0-051 补充题库 第39题 日期运算

一、原题 You need to calculate the number of days from 1st Jan 2007 till date: Dates are stored in the default format of dd-mm-rr. Which two SQL statements would give the required output? (Choose two.) A. SELECT SYSDATE - TO_DATE(01/JANUARY/2007) FROM DU…

OCP-1Z0-051 第34题 先建表,再用alter加主键

一、原题 You created an ORDERS table with the following description: Name Null Type ORD_ID NOT NULL NUMBER(2) CUST_ID NOT NULL NUMBER(3) ORD_DATE NOT NULL DATE ORD_AMOUNT NOT…

OCP-1Z0-051 第52题 列别名

一、原题 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…

OCP-1Z0-051 第30题 主外键约束,check约束

一、原题 Evaluate the following CREATE TABLE commands: CREATE TABLE orders (ord_no NUMBER(2) CONSTRAINT ord_pk PRIMARY KEY, ord_date DATE, cust_id NUMBER(4)); CREATE TABLE ord_items (ord_no NUMBER(2), item_no NUMBER(3), qty NUMBER(3) CHECK (qty BETWEEN 1…

OCP-1Z0-051 补充题库 第24题 SYNONYM同义词

一、原题 Examine the statement: Create synonym emp for hr.employees; What happens when you issue the statement? A. An error is generated. B. You will have two identical tables in the HR schema with different names. C. You create a table called employees …

OCP-1Z0-051 第27题 oracle对象命名规则

一、原题 Which two statements are true regarding tables? (Choose two.) A. A table name can be of any length. B. A table can have any number of columns. C. A column that has a DEFAULT value cannot store null values. D. A table and a view can have the same…

OCP-1Z0-051 第23题 数据类型

一、原题 Examine the structure proposed for the TRANSACTIONS table: name Null Type TRANS_ID NOT NULL NUMBER(6) CUST_NAME NOT NULL VARCHAR2(20) CUST_STATUS NOT NULL CHAR TRANS_DATE …

OCP-1Z0-051 第22题 INTERVAL DAY TO SECOND的使用方法

一、原题 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 period. 2) The data in the column should be stored in a for…

OCP-1Z0-051 第134题 子查询的用法

一、原题 Where can subqueries be used? (Choose all that apply.) A. field names in the SELECT statement. B. the FROM clause in the SELECT statement. C. the HAVING clause in the SELECT statement. D. the GROUP BY clause in the SELECT statement. E. the WHERE…

OCP-1Z0-051 第171题 事务结束的条件

一、原题 Which three statements/commands would cause a transaction to end? (Choose three.) A. COMMIT B. SELECT C. CREATE D. ROLLBACK E. SAVEPOINT 答案&#xff1a;ACD 二、题目翻译 下列哪三个语句/命令能导致一个事务结束&#xff1f;&#xff08;选择三个&…

OCP-1Z0-051 第154题 集合操作MINUS,INTERSECT

一、原题 View the Exhibit and evaluate structures of the SALES, PRODUCTS, and COSTS tables. Evaluate the following SQL statement: SQL>SELECT prod_id FROM products INTERSECT SELECT prod_id FROM sales MINUS SELECT p…

OCP-1Z0-051 第39题 视图的WITH CHECK OPTION选项

一、原题 Evaluate the following command: CREATE TABLE employees (employee_id NUMBER(2) PRIMARY KEY, last_name VARCHAR2(25) NOT NULL, department_id NUMBER(2) NOT NULL, job_id VARCHAR2(8), salary NUMBER(10,2)); You issue the following command to create a vi…

OCP-1Z0-051 补充题库 第18题 DELETE语句的特性

一、原题 Evaluate the following SQL statements: DELETE FROM sales; There are no other uncommitted transactions on the SALES table. Which statement is true about the DELETE statement? A. It removes all the rows as well as the structure of the table B. It …

OCP-1Z0-051 第46题 约束和索引

一、原题 Which statements are correct regarding indexes? (Choose all that apply.) A. When a table is dropped, the corresponding indexes are automatically dropped. B. A FOREIGN KEY constraint on a column in a table automatically creates a nonunique index.…

OCP-1Z0-051 第28题 oracle约束规则

一、原题 Which two statements are true regarding constraints? (Choose two.) A. A foreign key cannot contain NULL values. B. A column with the UNIQUE constraint can contain NULL values. C. A constraint is enforced only for the INSERT operation on a table.…

OCP-1Z0-051 第8题 子查询和多表关联查询和情况

一、原题 View the Exhibit and examine the structure of the CUSTOMERS table. Which two tasks would require subqueries or joins to be executed in a single statement? (Choose two)A. listing of customers who do not have a credit limit and were born before 198…

OCP-1Z0-051 第9题 集合操作INTERSECT注意事项

一、原题 Which statement is true regarding the INTERSECT operator?A. It ignores NULL values.B. Reversing the order of the intersected tables alters the result.C. The names of columns in all SELECT statements must be identical.D. The number of columns and…

OCP-1Z0-051 第173题 事务结束的条件

一、原题 When does a transaction complete? (Choose all that apply.) A. when a DELETE statement is executed B. when a ROLLBACK command is executed C. when a PL/SQL anonymous block is executed D. when a data definition language (DDL) statement is executed …

OCP-1Z0-051 第138题 not操作,IN、ANY、ALL的应用

一、原题 Which statement is true regarding subqueries? A. The LIKE operator cannot be used with single- row subqueries. B. The NOT IN operator is equivalent to IS NULL with single- row subqueries. C. ANY and ALL operators have the same functionality in m…

OCP-1Z0-051 补充题库 第41题 nvl函数的使用

一、原题 See the structure of the PROGRAMS table: Which two SQL statements would execute successfully? (Choose two.) A. SELECT NVL(ADD_MONTHS(END_DATE,1),SYSDATE) FROM programs; B. SELECT TO_DATE(NVL(SYSDATE-END_DATE,SYSDATE)) FRO…

OCP-1Z0-051 第103题 CASE.. WHEN,TO_CHAR,TRIM的用法

一、原题 Examine the structure of the TRANSACTIONS table: Name Null Type TRANS_ID NOT NULL NUMBER(3) CUST_NAME VARCHAR2(30) TRANS_DATE DATE TRANS_AMT NUMBER(10,2) You want to disp…

OCP-1Z0-051 第92题 日期格式

一、原题 View the Exhibit and examine the data in the PROMO_NAME and PROMO_END_DATE columns of the PROMOTIONS table, and the required output format. Which two queries give the correct result? (Choose two.) A. SELECT promo_name, TO_CHAR(promo_end_date,D…

OCP-1Z0-051 第90题 转换函数

一、原题 Examine the structure and data in the PRICE_LIST table: name Null Type PROD_ID NOT NULL NUMBER(3) PROD_PRICE VARCHAR2(10) PROD_ID PROD_PRICE 100 $234.55 1…

OCP-1Z0-051 第152题 union操作的注意事项

一、原题 Which statement is true regarding the UNION operator? A. By default, the output is not sorted. B. NULL values are not ignored during duplicate checking. C. Names of all columns must be identical across all SELECT statements. D. The number of col…

OCP-1Z0-051 补充题库 第15题 子查询和join

一、原题 The COMMISSION column shows the monthly commission earned by the employee. Which two tasks would require sub queries or joins in order to be performed in a single step? (Choose two.) A. listing the employees who earn the same amount of commissi…

OCP-1Z0-051 第62题 where通配符

一、原题 View the Exhibit and examine the structure of the CUSTOMERS table. You want to generate a report showing the last names and credit limits of all customers whose last names start with A, B, or C, and credit limit is below 10, 000. Evaluate the fol…

OCP-1Z0-051 第73题 oracle内置函数

一、原题 Which tasks can be performed using SQL functions that are built into Oracle database ? (Choose three .) A. finding the remainder of a division. B. adding a number to a date for a resultant date value. C. comparing two expressions to check whethe…

OCP-1Z0-051 第79题 TRIM,REPLACE,LOWER函数

一、原题 View the Exhibit and examine the structure of the CUSTOMERS table. In the CUSTOMERS table, the CUST_LAST_NAME column contains the values Anderson and Ausson. You issue the following query: SQL> SELECT LOWER(REPLACE(TRIM(son FROM cust_last_nam…

OCP-1Z0-051 第47题 索引

一、原题 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 CREATE INDEX statements are v…

OCP-1Z0-051 补充题库 第5题 主查询和子查询的注意事项

一、原题 Which three statements are true regarding sub queries? (Choose three.) A. Multiple columns or expressions can be compared between the main query and sub query B. Main query and sub query can get data from different tables C. Sub queries can cont…

OCP-1Z0-051 第83题 INSTR,SUBSTR,LPAD函数综合使用

一、原题 Examine the data in the CUST_NAME column of the CUSTOMERS table. CUST_NAME Lex De Haan Renske Ladwig Jose Manuel Urman Jason Mallin You want to extract only those customer names that have three names and display the * symbol in place of the firs…

OCP-1Z0-051 第61题 where通配符

一、原题 View the Exhibit and examine the structure of the PROMOTIONS table. You need to generate a report of all promos from the PROMOTIONS table based on the following conditions: 1. The promo name should not begin with T or N. 2. The promo should cost …

OCP-1Z0-051 第156题 集合操作中的ORDER BY 子句

一、原题 Evaluate the following SQL statement: SQL>SELECT cust_id, cust_last_name "Last Name" FROM customers WHERE country_id 10 UNION SELECT cust_id CUST_NO, cust_last_name FROM customers WHERE country_id 30; …

OCP-1Z0-051 第48题 索引

一、原题 Which two statements are true regarding indexes? (Choose two.) A. They can be created on tables and clusters. B. They can be created on tables and simple views. C. You can create only one index by using the same columns. D. You can create more t…

OCP-1Z0-051 补充题库 第29题 INSERT语句中有子查询

一、原题 View the Exhibit and examine the structure of the CUSTOMERS table. NEW_CUSTOMERS is a new table with the columns CUST_ID, CUST_NAME and CUST_CITY that have the same data types and size as the corresponding columns in the CUSTOMERS table. Evaluat…

OCP-1Z0-051 补充题库 第6题 SELECT查询语句

一、原题 See the Exhibit and examine the structure of the CUSTOMERS table: Using the CUSTOMERS table, you need to generate a report that shown the average credit limit for customers in WASHINGTON and NEW YORK. Which SQL statement would produce the requir…

OCP-1Z0-051 第151题 集合操作

一、原题 View the Exhibit and examine the structure of the CUSTOMERS and CUST_HISTORY tables. The CUSTOMERS table contains the current location of all currently active customers. The CUST_HISTORY table stores historical details relating to any changes in…

OCP-1Z0-051 第97题 NULLIF,NVL函数用法

一、原题 View the Exhibit and evaluate the structure and data in the CUST_STATUS table. You issue the following SQL statement: SQL> SELECT custno, NVL2(NULLIF(amt_spent,credit_limit), 0, 1000) "BONUS" FROM cust_status; Which st…

OCP-1Z0-051 补充题库 第27题 UNION的注意事项

一、原题 Which statement is true regarding the UNION operator? A. The number of columns selected in all SELECT statements need to be the same B. Names of all columns must be identical across all SELECT statements C. By default, the output is not sorted D…

OCP-1Z0-051 第68题 ORDER BY的默认值

一、原题 Which statement is true regarding the default behavior of the ORDER BY clause? A. In a character sort, the values are case- sensitive. B. NULL values are not considered at all by the sort operation. C. Only those columns that are specified in th…

OCP-1Z0-051 第78题 ROUND和TRUNC函数

一、原题 Evaluate the following query: SQL> SELECT TRUNC(ROUND(156.00,-1),-1) FROM DUAL; What would be the outcome?&#xff08;结果是什么&#xff1f;&#xff09; A. 16 B. 100 C. 160 D. 200 E. 150 答案&#xff1a;C 二、题目解析 ROUND(156…

OCP-1Z0-051 第74题 oracle单行函数

一、原题 Which statements are true regarding single row functions? (Choose all that apply.) A. MOD : returns the quotient of a division. B. TRUNC : can be used with NUMBER and DATE values. C. CONCAT : can be used to combine any number of values. D. SYSDA…

OCP-1Z0-051 第82题 like模糊查询

一、原题 Examine the data in the CUST_NAME column of the CUSTOMERS table. CUST_NAME Renske Ladwig Jason Mallin Samuel McCain Allan MCEwen Irene Mikkilineni Julia Nayer You need to display customers second names where the second name starts with "Mc&q…

OCP-1Z0-051 第40题 视图的注意事项

一、原题 View 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: CREATE VIEW sale_prod AS SELECT p.prod_id, cust_id, SUM(quantity_sold) "Quantity&qu…

OCP-1Z0-051 第75题 ROUND和RPAD函数

一、原题 The following data exists in the PRODUCTS table: PROD_ID PROD_LIST_PRICE 123456 152525.99 You issue the following query: SQL> SELECT RPAD(( ROUND(prod_list_price)), 10,*) FROM products WHERE prod_id…

OCP-1Z0-051 第60题

一、原题 View the Exhibit and examine the structure of CUSTOMERS table. Evaluate the following query: SQL>SELECT cust_id, cust_city FROM customers WHERE cust_first_name NOT LIKE A_%g_% AND cust_credit_limit BETWEEN 5…

OCP-1Z0-051 补充题库 第11题 SQL和SQL*Plus的区别

一、原题 Which statement correctly describes SQL and /SQL*Plus? A. Both SQL and /SQL*plus allow manipulation of values in the database. B. /SQL*Plus recognizes SQL statements and sends them to the server; SQL is the Oracle proprietary interface for execu…

OCP-1Z0-051 第108题 COUNT函数使用注意事项

一、原题 Which two statements are true regarding the COUNT function? (Choose two.) A. The COUNT function can be used only for CHAR, VARCHAR2, and NUMBER data types. B. COUNT(*) returns the number of rows including duplicate rows and rows containing NULL …

OCP-1Z0-051 第131题 LEFT OUTER JOIN和RIGHT OUTER JOIN的用法

一、原题 View the Exhibit and examine the structure of the PRODUCT, COMPONENT, and PDT_COMP tables. In PRODUCT table, PDTNO is the primary key. In COMPONENT table, COMPNO is the primary key. In PDT_COMP table, (PDTNO,COMPNO) is the primary key, PDTNO is …

OCP-1Z0-051 补充题库 第7题 ORDER BY 子句

一、原题 Evaluate these two SQL statements: SELECT last_name, salary, hire_date FROM EMPLOYEES ORDER BY salary DESC; SELECT last_name, salary, hire_date FROM EMPLOYEES ORDER BY 2 DESC; What is true about them? A. The two statements produce identical resu…

OCP-1Z0-051 补充题库 第9题 to_char将数字转成字符的格式应用

一、原题 Which three SQL statements would display the value 1890.55 as $1,890.55? (Choose three.) A. SELECT TO_CHAR(1890.55,$99G999D00) FROM DUAL; B. SELECT TO_CHAR(1890.55,$9,999V99) FROM DUAL; C. SELECT TO_CHAR(1890.55,$0G000D00) FROM DUAL; D. SELECT …

OCP-1Z0-051 补充题库 第31题 subquery子查询的注意事项

一、原题 Which two statements about sub queries are true? (Choose two.) A. A sub query should retrieve only one row. B. A sub query can retrieve zero or more rows. C. A sub query can be used only in SQL query statements. D. Sub queries CANNOT be nested b…

OCP-1Z0-051 第55题 in和or的性能比较

一、原题 Evaluate the following two queries: SQL> SELECT cust_last_name, cust_city FROM customers WHERE cust_credit_limit IN (1000, 2000, 3000); SQL> SELECT cust_last_name, cust_city FROM customers WHERE cust_credit_limit 1000 OR cust_credit_limit …

OCP-1Z0-051 第66题 ORDER BY子句应用

一、原题 View the Exhibit and examine the data in the 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 descendin…

OCP-1Z0-051 第32题 create table 建表语句

一、原题 Which CREATE TABLE statement is valid? A. CREATE TABLE ord_details (ord_no NUMBER(2) PRIMARY KEY, item_no NUMBER(3) PRIMARY KEY, ord_date DATE NOT NULL); B. CREATE TABLE ord_details (ord_no NUMBER(2) UNIQUE, NOT NULL, item_no NUMBER(3), ord_date…

OCP-1Z0-051 第169题 使用子查询DELETE数据

一、原题 View the Exhibit and examine the description for the PRODUCTS and SALES table.PROD_ID is a primary key in the PRODUCTS table and foreign key in the SALES table. You want to remove all the rows from the PRODUCTS table for which no sale was done fo…

OCP-1Z0-051 第153题 集合操作和JOIN

一、原题 View the Exhibits and examine the structures of the PRODUCTS and SALES tables. Which two SQL statements would give the same output? (Choose two.) A. SELECT prod_id FROM products INTERSECT SELECT prod_id FROM sales; B. SELECT prod_id …

OCP-1Z0-051 第37题 drop table

一、原题 You issued the following command to drop the PRODUCTS table: SQL> DROP TABLE products; What is the implication of this command? (Choose all that apply.) A. All data along with the table structure is deleted. B. The pending transaction in the s…

OCP-1Z0-051 第63题 order by 应用

一、原题 View the Exhibit and examine the structure of the PRODUCTS table. You want to display only those product names with their list prices where the list price is at least double the minimum price. The report should start with the product name having…

OCP-1Z0-051 第67题 ORDER BY子句应用

一、原题 Which two statements are true regarding the ORDER BY clause? (Choose two.) A. It is executed first in the query execution. B. It must be the last clause in the SELECT statement. C. It cannot be used in a SELECT statement containing a HAVING clau…

OCP-1Z0-051 第72题 oracle内置函数

一、原题 Which tasks can be performed using SQL functions built into Oracle Database ? (Choose three.) A. displaying a date in a nondefault format. B. finding the number of characters in an expression. C. substituting a character string in a text express…

OCP-1Z0-051 第71题 oracle内置函数

一、原题 Which arithmetic operations can be performed on a column by using a SQL function that is built into Oracle database ? (Choose three .) A. addition B. subtraction C. raising to a power D. finding the quotient E. finding the lowest value 答案&…

OCP-1Z0-051 第70题 order by排升序,降序

一、原题 View the Exhibit and examine the structure of the PRODUCTS table. You want to display only those product names with their list prices where the list price is at least double the minimum price. The report should start with the product name having…

OCP-1Z0-051 第69题 ORDER BY 的null值排序

一、原题 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…

OCP-1Z0-051 第140题 子查询中使用GROUP BY注意事项

一、原题 Examine the structure of the PRODUCTS table: Name Null Type PROD_ID NOT NULL NUMBER(4) PROD_NAME VARCHAR2(20) PROD_STATUS VARCHAR2(6) QTY_IN_HAND …

OCP-1Z0-051 第135题 子查询注意事项

一、原题 Which three statements are true regarding subqueries? (Choose three.) A. Subqueries can contain GROUP BY and ORDER BY clauses. B. Main query and subquery can get data from different tables. C. Main query and subquery must get data from the same …

OCP-1Z0-051 第137题 子查询的应用

一、原题 View the Exhibits and examine PRODUCTS and SALES tables. You issue the following query to display product name and the number of times the product has been sold: SQL>SELECT p.prod_name, i.item_cnt FROM (SELECT prod_id, COUNT(*) …

OCP-1Z0-051 第141题 子查询的应用

一、原题 View the Exhibit and examine the structure of CUSTOMERS and GRADES tables. You need to display names and grades of customers who have the highest credit limit. Which two SQL statements would accomplish the task? (Choose two.) A.SELECT custname,…

OCP-1Z0-051 第36题 建表语句加约束

一、原题 Examine the following SQL commands: SQL>CREATE TABLE products ( prod_id NUMBER(3) CONSTRAINT p_ck CHECK (prod_id > 0), prod_name CHAR(30), prod_qty NUMBER(6), CONSTRAINT p_name NOT …

OCP-1Z0-051 第58题 转义字符escape

一、原题 The PART_CODE column in the SPARES table contains the following list of values: PART_CODE A%_WQ123 A%BWQ123 AB_WQ123 Evaluate the following query: SQL> SELECT part_code FROM spares WHERE part_code LIKE %\%_WQ12% ESCAPE \…

OCP-1Z0-051 第99题 AVG函数

一、原题 View the Exhibit and examine the structure of the PROMOTIONS table. Using the PROMOTIONS table, you need to find out the average cost for all promos in the ranges $0-2000 and $2000-5000 in category A You issue the following SQL statement: SQL&g…

OCP-1Z0-051 补充题库 第17题 约束的注意事项

一、原题 Evaluate the following SQL statements: The above command fails when executed. What could be the reason? A. The BETWEEN clause cannot be used for the CHECK constraint B. SYSDATE cannot be used with the CHECK constraint C. ORD_NO and ITEM_NO c…

OCP-1Z0-051 第3题 转义字符

一、原题 You need to extract details of those products in the SALES table where the PROD_ID column contains the string _D123.Which WHERE clause could be used in the SELECT statement to get the required output?A. WHERE prod_id LIKE %_D123% ESCAPE _B. WHER…

OCP-1Z0-051 第168题 使用子查询DELETE数据

一、原题 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 …

OCP-1Z0-051 第5题 to_char的数字的格式

一、原题 Which SQL statements would display the value 1890.55 as $1,890.55? (Choose three)A. SELECT TO_CHAR(1890.55,$0G000D00) FROM DUAL;B. SELECT TO_CHAR(1890.55,$9,999V99) FROM DUAL;C. SELECT TO_CHAR(1890.55,$99,999D99) FROM DUAL;D. SELECT TO_CHAR(189…

OCP-1Z0-051 第148题 子查询和ANY,ALL的使用

一、原题 View the Exhibit and examine the structure of the PRODUCTS tables. You want to generate a report that displays the average list price of product categories where the average list price is less than half the maximum in each category. Which query …

OCP-1Z0-051 第41题 视图的注意事项

一、原题 Which two statements are true regarding views? (Choose two.) A. A subquery that defines a view cannot include the GROUP BY clause. B. A view that is created with the subquery having the DISTINCT keyword can be updated. C. A view that is created …

OCP-1Z0-051 第91题 TO_DATE转换函数

一、原题 View the Exhibit and examine the structure of the PROMOTIONS table. Which two SQL statements would execute successfully? (Choose two.) A. UPDATE promotions SET promo_cost promo_cost 100 WHERE TO_CHAR(promo_end_date, yyyy) >…

OCP-1Z0-051 第125题 self-join(自连接)和self-join(子查询)

一、原题 Examine the structure of the CUSTOMERS table: Name Null Type CUSTNO NOT NULL NUMBER(3) CUSTNAME NOT NULL VARCHAR2(25) CUSTADDRESS VARCHAR2(35) CUST_CREDIT_LIMIT NUMBER…

OCP-1Z0-051 第93题 NVL函数

一、原题 View the Exhibit and examine the structure of the CUSTOMERS table. Using the CUSTOMERS table,you need to generate a report that shows an increase in the credit limit by 15% for all customers. Customers whose credit limit has not been entered sho…

OCP-1Z0-051 补充题库 第42题 DROP TABLE命令的影响

一、原题 You issue the following command to drop the PRODUCTS table: SQL>DROP TABLE products; What is the implication of this command? (Choose all that apply.) A. All data in the table are deleted but the table structure will remain B. All data along …

OCP-1Z0-051 第56题 日期时间段

一、原题 View the Exhibit and examine the structure of the PROMOTIONS table. Using the PROMOTIONS table, you need to find out the names and cost of all the promos done on TV and internet that ended in the time interval 15th March 00 to 15th October 00. Wh…

OCP-1Z0-051 补充题库 第44题 NATURAL JOIN自然连接

一、原题 View the Exhibits and examine the structures of the PRODUCTS, SALES, and CUSTOMERS tables.You issue the following query: SQL>SELECT p.prod_id,prod_name,prod_list_price, quantity_sold,cust_last_name FROM products p NATURAL JOIN sal…

OCP-1Z0-051 补充题库 第43题 子查询

一、原题 Exhibit contains the structure of PRODUCTS table: Evaluate the following query: What would be the outcome of executing the above SQL statement? A. It produces an error B. It shows the names of products whose list price is the second h…

OCP-1Z0-051 第31题 约束规则

一、原题 Evaluate the following SQL commands: SQL>CREATE SEQUENCE ord_seq INCREMENT BY 10 START WITH 120 MAXVALUE 9999 NOCYCLE; SQL> CREATE TABLE or…

OCP-1Z0-051 第29题 约束

一、原题 Which two statements are true regarding constraints? (Choose two.) A. A foreign key cannot contain NULL values. B. The column with a UNIQUE constraint can store NULLS . C. A constraint is enforced only for an INSERT operation on a table. D. You …

OCP-1Z0-051 补充题库 第14题 关于表约束的视图

一、原题 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 二、题目翻译 对于用户自己建…

OCP-1Z0-051 第77题 INITCAP和SUBSTR函数

一、原题 In the CUSTOMERS table, the CUST_CITY column contains the value Paris for the CUST_FIRST_NAME ABIGAIL. Evaluate the following query: SQL> SELECT INITCAP(cust_first_name|| || UPPER(SUBSTR(cust_city,-LENGTH(cust_city),2…

OCP-1Z0-051 第100题 DECODE,NULLIF函数用法

一、原题 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 promo…

OCP-1Z0-051 第102题 TO_DATE,TO_CHAR,TO_NUMBER函数的用法

一、原题 Examine the structure of the TRANSACTIONS table:&#xff09; Name Null Type TRANS_ID NOT NULL NUMBER(3) CUST_NAME VARCHAR2(30) TRANS_DATE TIMESTAMP TRANS_AMT …

OCP-1Z0-051 第104题 DECODE,NVL,COALESCE函数用法

一、原题 Examine the structure of the PROMOS table: Name Null Type PROMO_ID NOT NULL NUMBER(3) PROMO_NAME VARCHAR2(30) PROMO_START_DATE NOT NULL DATE PROMO_…

OCP-1Z0-051 第121题 NATURAL JOIN自然连接

一、原题 Which two statements are true regarding the USING clause in table joins? (Choose two.) A.It can be used to join a maximum of three tables. B.It can be used to restrict the number of columns used in a NATURAL join. C.It can be used to access data…

OCP-1Z0-051 第123题 JOIN中的USING子句,ON子句

一、原题 View the Exhibits and examine the structures of the PRODUCTS, SALES, and CUSTOMERS tables. You need to generate a report that gives details of the customers last name, name of the product, and the quantity sold for all customers in Tokyo . Whic…

OCP-1Z0-051 第124题 JOIN内连接

一、原题 View the Exhibit and examine the structure of the PROMOTIONS, SALES, and CUSTOMER tables. You need to generate a report showing the promo name along with the customer name for all products that were sold during their promo campaign and before 30…

OCP-1Z0-051 第126题 LEFT OUTER JOIN,FULL OUTER JOIN,JOIN的使用

一、原题 View the Exhibit and examine the data in the PROJ_TASK_DETAILS table. The PROJ_TASK_DETAILS table stores information about tasks involved in a project and the relation between them. The BASED_ON column indicates dependencies between tasks. Some …

OCP-1Z0-051 第157题 事务和锁

一、原题 View the Exhibit and examine the structure of the ORDERS and CUSTOMERS tables. Evaluate the following SQL command: SQL>SELECT o.order_id, c.cust_name, o.order_total, c.credit_limit FROM orders o JOIN customers c USING (custom…

OCP-1Z0-051 第44题 SEQUENCE的缺省值

一、原题 View the Exhibit and examine the structure of the ORD table. Evaluate the following SQL statements that are executed in a user session in the specified order: CREATE SEQUENCE ord_seq; SELECT ord_seq.nextval FROM dual; INSERT INTO ord VALUES (ord…

OCP-1Z0-051 补充题库 第21题 SEQUENCE序列注意事项

一、原题 Which two statements are true about sequences created in a single instance database? (Choose two.) A. CURRVAL is used to refer to the last sequence number that has been generated B. DELETE <sequencename> would remove a sequence from the da…

OCP-1Z0-051 第122题 NATURAL JOIN(自然连接)和USING子句的用法

一、原题 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: Statement 1 SQL&…

OCP-1Z0-051 第94题 MONTHS_BETWEEN,NVL函数

一、原题 Examine the structure of the PROGRAMS table: Name Null Type PROG_ID NOT NULL NUMBER(3) PROG_COST NUMBER(8,2) START_DATE NOT NULL DATE END_DATE DATE Which two SQL stat…

OCP-1Z0-051 第136题 子查询的使用

一、原题 View the Exhibit and examine the structure of the PRODUCTS table. Which two tasks would require subqueries? (Choose two.) A. Display the minimum list price for each product status. B. Display all suppliers whose list price is less than 1000. C.…

OCP-1Z0-051 第11题 sql运算顺序

一、原题 View the Exhibit and examine the structure of the PRODUCTS table.All products have a list price.You issue the following command to display the total price of each product after a discount of 25% and a tax of 15% are applied on it. Freight charges…

OCP-1Z0-051 补充题库 第25题 TRUNC和ROUND

一、原题 Evaluate the following SQL query; SQL> SELECT TRUNC(ROUND(156.00,-1),-1) FROM DUAL; What would be the outcome? A. 200 B. 16 C. 160 D. 150 E. 100 答案: C 二、题目解析 ROUND(156.00,-1) round表示四舍五入&#xff0c;-1表示保留到小数…

OCP-1Z0-051 第142题 嵌套子查询的应用

一、原题 View the Exhibit and examine the structure of the PRODUCTS table. Evaluate the following query: SQL> SELECT prod_name FROM products WHERE prod_id IN (SELECT prod_id FROM products WHERE pro…

OCP-1Z0-051 第144题 子查询的应用

一、原题 View the Exhibit and examine the structure of the PRODUCTS table. You want to display the category with the maximum number of items. You issue the following query: SQL>SELECT COUNT(*), prod_category_id FROM products GROUP BY prod_cate…

OCP-1Z0-051 补充题库 第19题 限制替代变量的输入值

一、原题 Examine the structure of the EMPLOYEES table:You want to create a SQL script file that contains an INSERT statement. When the script is run,the INSERT statement should insert a row with the specified values into the EMPLOYEES table.The INSERT sta…

OCP-1Z0-051 第118题 GROUP BY,HAVING子句

一、原题 View the Exhibit and examine the structure of the PROMOTIONS table. Examine the following two SQL statements: Statement 1 SQL>SELECT promo_category,SUM(promo_cost) FROM promotions WHERE promo_end_date-promo_begin…

OCP-1Z0-051 第38题 视图注意事项

一、原题 Which two statements are true regarding views? (Choose two.) A. A simple view in which column aliases have been used cannot be updated. B. Rows cannot be deleted through a view if the view definition contains the DISTINCT keyword. C. Rows added …

OCP-1Z0-051 第150题 集合运算MINUS,INTERSECT

一、原题 View the Exhibit and examine the data in the PROMOTIONS table. You need to display all promo categories that do not have discount in their subcategory. Which two SQL statements give the required result? (Choose two.) A. SELECT promo_category …

OCP-1Z0-051 补充题库 第26题 单行函数特点

一、原题 Which two statements are true regarding single row functions? (Choose two.) A. They can be nested only to two levels B. They always return a single result row for every row of a queried table C. Arguments can only be column values or constant. D…

OCP-1Z0-051 第149题 子查询中ALL的应用

一、原题 View the Exhibits and examine the structures of the COSTS and PROMOTIONS tables. Evaluate the following SQL statement: SQL>SELECT prod_id FROM costs WHERE promo_id IN (SELECT promo_id FROM promotions …

OCP-1Z0-051 第95题 NVL,NVL2函数用法

一、原题 The PRODUCTS table has the following structure: name Null Type PROD_ID NOT NULL NUMBER(4) PROD_NAME VARCHAR2(25) PROD_EXPIRY_DATE …

OCP-1Z0-051 第96题 NVL2函数的详细用法

一、原题 Examine the structure of the INVOICE table. name Null Type INV_NO NOT NULL NUMBER(3) INV_DATE DATE INV_AMT NUMBER(10,2) Which two SQL statements would e…

OCP-1Z0-051 第101题 DECODE,COUNT,CASE WHEN,SUM的使用

一、原题 Examine the data in the PROMO_BEGIN_DATE column of the PROMOTIONS table: PROMO_BEGIN _DATE 04-jan-00 10-jan-00 15-dec-99 18-oct-98 22-aug-99 You want to display the number of promotions started in 1999 and 2000. Which query gives the correct outp…

OCP-1Z0-051 第166题 使用子查询update表中的多列

一、原题 View the Exhibit and examine the structures of the EMPLOYEES and DEPARTMENTS tables. You want to update the EMPLOYEES table as follows: -Update only those employees who work in Boston or Seattle (locations 2900 and 2700). -Set department_id for …

OCP-1Z0-051 补充题库 第35题 LONG类型

一、原题 Examine the description of the EMP_DETAILS table given below: Exhibit: Which two statements are true regarding SQL statements that can be executed on the EMP_DETAIL table? (Choose two.) A. An EMP_IMAGE column can be included in the GROUP BY c…

OCP-1Z0-051 补充题库 第1题 TRUNCATE命令的使用

一、原题 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 t…

OCP-1Z0-051 第175题 savepoint的注意事项

一、原题 Which two statements are true regarding savepoints? (Choose two.) A. Savepoints are effective only for COMMIT. B. Savepoints may be used to ROLLBACK. C. Savepoints can be used for only DML statements. D. Savepoints are effective for both COMMIT …

OCP-1Z0-051 第170题 DELETE的注意事项

一、原题 Which two statements are true regarding the DELETE and TRUNCATE commands? (Choose two.) A. DELETE can be used to remove only rows from only one table at a time. B. DELETE can be used to remove only rows from multiple tables at a time. C. DELETE …

OCP-1Z0-051 第114题 HAVING,GROUP BY子句的应用

一、原题 View the Exhibit and examine the structure of the SALES table. The following query is written to retrieve all those product ID s from the SALES table that have more than 55000 sold and have been ordered more than 10 times. SQL> SELECT prod_id…

OCP-1Z0-051 第105题 NVL,DECODE,NULLIF,TRUNC,TO_CHAR函数使用

一、原题 Examine the structure of the PROMOS table: Name Null Type PROMO_ID NOT NULL NUMBER(3) PROMO_NAME VARCHAR2(30) PROMO_START_DATE NOT NULL DATE …

OCP-1Z0-051 第64题 order by使用别名注意事项

一、原题 View the Exhibit and examine the data in the PROMO_CATEGORY and PROMO_COST columns of the PROMOTIONS table. Evaluate the following two queries: SQL>SELECT DISTINCT promo_category to_char(promo_cost)"code" FROM prom…

OCP-1Z0-051 第57题 别名和null值判断

一、原题 The CUSTOMERS table has the following structure: Name Null Type CUST_ID NOT NULL NUMBER CUST_FIRST_NAME NOT NULL VARCHAR2(20) CUST_LAST_NAME NOT NULL VARCH…

OCP-1Z0-051 第12题 别名的用法

一、原题 You need to produce a report where each customers credit limit has been incremented by $1000. In the output, the customers last name should have the heading Name and the incremented credit limit should be labeled New Credit Limit. The column head…

OCP-1Z0-051 补充题库 第23题 表连接中别名的使用

一、原题 Evaluate this SQL statement: SELECT e.emp_name, d.dept_name FROM employees e JOIN departments d USING (department_id) WHERE d.department_id NOT IN (10,40) ORDER BY dept_name; The statement fails when executed. Which change fixes the error? A. re…

OCP-1Z0-051 补充题库 第22题 SYNONYM同义词

一、原题 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 SYN…

OCP-1Z0-051 补充题库 第38题 nvl用法

一、原题 See the Exhibit and Examine the structure of the CUSTOMERS table: Using the CUSTOMERS table, you need to generate a report that shows an increase in the credit limit by 15% for all customers. Customers whose credit limit has not been entered sho…

OCP-1Z0-051 补充题库 第37题

一、原题 See the exhibit and examine the structure of the CUSTOMERS and GRADES tables: You need to display names and grades of customers who have the highest credit limit. Which two SQL statements would accomplish the task? (Choose two.) A. SELECT custn…

OCP-1Z0-051 第145题 子查询嵌套

一、原题 View the Exhibit and examine the structure of the CUSTOMERS table. You issue the following SQL statement on the CUSTOMERS table to display the customers who are in the same country as customers with the last name KING and whose credit limit is l…

OCP-1Z0-051 第6题 case when和decode的用法

一、原题 Examine the structure of the SHIPMENTS table:Name Null TypePO_ID NOT NULL NUMBER(3) PO_DATE NOT NULL DATE SHIPMENT_DATE NOT NULL DATE SHIPMENT_MODE VARCH…

OCP-1Z0-051 第133题 子查询的用法

一、原题 Which two statements are true regarding subqueries? (Choose two.) A. A subquery can retrieve zero or more rows. B. Only two subqueries can be placed at one level. C. A subquery can be used only in SQL query statements. D. A subquery can appear o…

OCP-1Z0-051 第7题 ON和USING子句的用法与区别

一、原题 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 nonequijoins.B. A maximum of one pair of columns can be joined between two tables using the …

OCP-1Z0-051 补充题库 第3题 隐式格式转换

一、原题 Here is the structure and data of the CUST_TRANS table: Exhibit: Dates are stored in the default date format dd-mm-rr in the CUST_TRANS table. Which three SQL statements would execute successfully? (Choose three.) A. SELECT transdate 10 FROM c…

OCP-1Z0-051 第117题 WHERE和HAVING子句的区别

一、原题 Which statements are true regarding the WHERE and HAVING clauses in a SELECT statement?(Choose all that apply.) A. The HAVING clause can be used with aggregate functions in subqueries. B. The WHERE clause can be used to exclude rows after dividi…

OCP-1Z0-051 第80题 DATE数据类型

一、原题 Which two statements are true regarding working with dates? (Choose two.) A. The default internal storage of dates is in the numeric format. B. The default internal storage of dates is in the character format. C. The RR date format automatically…

OCP-1Z0-051 补充题库 第2题 添加外键FOREIGN KEY

一、原题 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 students grades. Both of th…

OCP-1Z0-051 第115题 HAVING,GROUP BY子句的应用

一、原题 View the Exhibit and examine the structure of the CUSTOMERS table. Evaluate the following SQL statement: SQL> SELECT cust_city, COUNT(cust_last_name) FROM customers WHERE cust_credit_limit > 1000 GROUP BY cust_city HAVING AVG(cust_credit_l…

OCP-1Z0-051 第20题 oracle数据类型

一、原题 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 table. B. A TIMESTAMP data type column stores only time values with fractional seconds. C. The BLOB data …

OCP-1Z0-051 补充题库 第13题 MERGE INTO语句

一、原题 Examine the structure of the EMPLOYEES and NEW_EMPLOYEES tables: Which MERGE statement is valid? A. MERGE INTO new_employees c USING employees e ON (c.employee_id e.employee_id) WHEN MATCHED THEN UPDATE SET name e.first_name || , || e.last…

OCP-1Z0-051 第159题 insert语句中使用子查询

一、原题 View the Exhibit and examine the structure of the CUSTOMERS table. NEW_CUSTOMERS is a new table with the columns CUST_ID, CUST_NAME and CUST_CITY that have the same data types and size as the corresponding columns in the CUSTOMERS table. Evaluat…

OCP-1Z0-051 第146题 子查询中的null值

一、原题 Evaluate the following SQL statement: SQL>SELECT cust_id, cust_last_name FROM customers WHERE cust_credit_limit IN (SELECT cust_credit_limit FROM customers WHERE cust_city Singapore); Which sta…