Download as pdf or txt
Download as pdf or txt
You are on page 1of 18

100% Valid and Newest Version 1Z0-071 Questions & Answers shared by Certleader

https://www.certleader.com/1Z0-071-dumps.html (187 Q&As)

1Z0-071 Dumps

Oracle Database 12c SQL

https://www.certleader.com/1Z0-071-dumps.html

The Leader of IT Certification visit - https://www.certleader.com


100% Valid and Newest Version 1Z0-071 Questions & Answers shared by Certleader
https://www.certleader.com/1Z0-071-dumps.html (187 Q&As)

NEW QUESTION 1
You must write a query that prompts users for column names and conditions every time it is executed. (Choose the best answer.)
The user must be prompted only once for the table name. Which statement achieves those objectives?

A. SELECT &col1, '&col2'FROM &tableWHERE &&condition = '&cond';


B. SELECT &col1, &col2 FROM "&table"WHERE &condition =&cond;
C. SELECT &col1, &col2 FROM &&tableWHERE &condition = &cond;
D. SELECT &col1, &col2 FROM &&tableWHERE &condition = &&cond

Answer: C

NEW QUESTION 2
Which three statements are true regarding subqueries?

A. Multiple columns or expressions can be compared between the main query and subquery.
B. Subqueries can contain ORDER BY but not the GROUP BY clause.
C. Main query and subquery can get data from different tables.
D. Subqueries can contain GROUP BY and ORDER BY clauses.
E. Main query and subquery must get data from the same tables.
F. Only one column or expression can be compared between the main query and subquery.

Answer: ACD

Explanation:
References:
http://docs.oracle.com/javadb/10.6.2.1/ref/rrefsqlj13658.html

NEW QUESTION 3
You are designing the structure of a table in which two columns have the specifications:
COMPONENT_ID – must be able to contain a maximum of 12 alphanumeric characters and uniquely identify the row
EXECUTION_DATETIME – contains Century, Year, Month, Day, Hour, Minute, Second to the maximum precision and is used for calculations and comparisons
between components.
Which two options define the data types that satisfy these requirements most efficiently?

A. The EXECUTION_DATETIME must be of INTERVAL DAY TO SECOND data type.


B. The EXECUTION_DATETIME must be of TIMESTAMP data type.
C. The EXECUTION_DATETIME must be of DATE data type.
D. The COMPONENT_ID must be of ROWID data type.
E. The COMPONENT_ID must be of VARCHAR2 data type.
F. The COMPONENT_ID column must be of CHAR data type.

Answer: CF

NEW QUESTION 4
Which two statements are true regarding the COUNT function?

A. A SELECT statement using the COUNT function with a DISTINCT keyword cannot have a WHERE clause.
B. COUNT (DISTINCT inv_amt) returns the number of rows excluding rows containing duplicates and NULL values in the INV_AMT column.
C. COUNT (cust_id) returns the number of rows including rows with duplicate customer IDs and NULL value in the CUST_ID column.
D. COUNT (*) returns the number of rows including duplicate rows and rows containing NULL value in any of the columns.
E. The COUNT function can be used only for CHAR, VARCHAR2, and NUMBER data types.

Answer: BD

NEW QUESTION 5
Evaluate this ALTER TABLE statement: (Choose the best answer.) ALTER TABLE orders
SET UNUSED (order_date); Which statement is true?

A. After executing the ALTER TABLE command, a new column called ORDER_DATE can be added to the ORDERS table.
B. The ORDER_DATE column must be empty for the ALTER TABLE command to execute successfully.
C. ROLLBACK can be used to restore the ORDER_DATE column.
D. The DESCRIBE command would still display the ORDER_DATE column.

Answer: A

NEW QUESTION 6
You want to display 5 percent of the rows from the SALES table for products with the lowest AMOUNT_SOLD and also want to include the rows that have the
same AMOUNT_SOLD even if this causes the output to exceed 5 percent of the rows.
Which query will provide the required result?

A. SELECT prod_id, cust_id, amount_soldFROM salesORDER BY amount_soldFETCH FIRST 5 PERCENT ROWS WITH TIES;
B. SELECT prod_id, cust_id, amount_soldFROM salesORDER BY amount_soldFETCH FIRST 5 PERCENT ROWS ONLY WITH TIES;
C. SELECT prod_id, cust_id, amount_soldFROM salesORDER BY amount_soldFETCH FIRST 5 PERCENT ROWS WITH TIES ONLY;
D. SELECT prod_id, cust_id, amount_soldFROM salesORDER BY amount_soldFETCH FIRST 5 PERCENT ROWS ONLY;

Answer: A

The Leader of IT Certification visit - https://www.certleader.com


100% Valid and Newest Version 1Z0-071 Questions & Answers shared by Certleader
https://www.certleader.com/1Z0-071-dumps.html (187 Q&As)

NEW QUESTION 7
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_dateFROM 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: C

NEW QUESTION 8
View the exhibit for the structure of the STUDENT and FACULTY tables. STUDENT
NameNull?Type
-------------------------------------------------- STUDENT_IDNOT NULLNUMBER(2) STUDENT_NAMEVARCHAR2(20) FACULTY_IDVARCHAR2(2)
LOCATION_IDNUMBER(2) FACULTY
NameNull?Type
-------------------------------------------------- FACULTY_IDNOT NULLNUMBER(2) FACULTY_NAMEVARCHAR2(20) LOCATION_IDNUMBER(2)
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>SELECT faculty_name, COUNT(student_id) FROM student JOIN faculty
USING (faculty_id, location_id) GROUP BY faculty_name; Statement 2
SQL>SELECT faculty_name, COUNT(student_id)
FROM student NATURAL JOIN faculty GROUP BY faculty_name;
Which statement is true regarding the outcome?

A. Only statement 2 executes successfully and gives the required result.


B. Only statement 1 executes successfully and gives the required result.
C. Both statements 1 and 2 execute successfully and give different results.
D. Both statements 1 and 2 execute successfully and give the same required result.

Answer: B

NEW QUESTION 9
Which statement is 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 access data from tables through equijoins as well as nonequijoins.
C. It can be used to join tables that have columns with the same name and compatible data types.
D. It can be used to restrict the number of columns used in a NATURAL join.

Answer: CD

NEW QUESTION 10
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
Identify three ORDER BY clauses either one of which can complete the query.

A. ORDER BY "Last name"


B. ORDER BY 2, cust_id
C. ORDER BY CUST_NO
D. ORDER BY 2, 1
E. ORDER BY "CUST_NO"

Answer: ABD

The Leader of IT Certification visit - https://www.certleader.com


100% Valid and Newest Version 1Z0-071 Questions & Answers shared by Certleader
https://www.certleader.com/1Z0-071-dumps.html (187 Q&As)

Explanation:
Using the ORDER BY Clause in Set Operations
-The ORDER BY clause can appear only once at the end of the compound query.
-Component queries cannot have individual ORDER BY clauses.
-The ORDER BY clause recognizes only the columns of the first SELECT query.
-By default, the first column of the first SELECT query is used to sort the output in an ascending order.

NEW QUESTION 10
Which two statements are true regarding savepoints? (Choose two.)

A. Savepoints may be used to ROLLBACK.


B. Savepoints can be used for only DML statements.
C. Savepoints are effective only for COMMIT.
D. Savepoints are effective for both COMMIT and ROLLBACK.
E. Savepoints can be used for both DML and DDL statements.

Answer: AB

NEW QUESTION 11
Examine the structure of the MEMBERS table: NameNull?Type
------------------------------------------------------------ MEMBER_IDNOT NULLVARCHAR2 (6)
FIRST_NAMEVARCHAR2 (50)
LAST_NAMENOT NULLVARCHAR2 (50)
ADDRESSVARCHAR2 (50)
CITYVARCHAR2 (25)
STATEVARCHAR2 (3)
You want to display details of all members who reside in states starting with the letter A followed by exactly one character.
Which SQL statement must you execute?

A. SELECT * FROM MEMBERS WHERE state LIKE '%A_*;


B. SELECT * FROM MEMBERS WHERE state LIKE 'A_*;
C. SELECT * FROM MEMBERS WHERE state LIKE 'A_%';
D. SELECT * FROM MEMBERS WHERE state LIKE 'A%';

Answer: B

NEW QUESTION 13
View the Exhibit and examine, the description for the SALES and CHANNELS tables. (Choose the best answer.)

You issued this SQL statement:


INSERT INTO SALES VALUES (23, 2300, SYSDATE, (SELECT CAHNNEL_ID
FROM CHANNELS

The Leader of IT Certification visit - https://www.certleader.com


100% Valid and Newest Version 1Z0-071 Questions & Answers shared by Certleader
https://www.certleader.com/1Z0-071-dumps.html (187 Q&As)

WHERE CHANNEL_DESC='DIRECT SALES'), 12, 1, 500);


Which statement is true regarding the result?

A. The statement will fail because the sub-query in the VALUES clause is not enclosed within single quotation marks.
B. The statement will fail because a subquery cannot be used in a VALUES clause.
C. The statement will execute and a new row will be inserted in the SALES table.
D. The statement will fail because the VALUES clause is not required with the subquery.

Answer: C

NEW QUESTION 14
Which three statements are true regarding the data types?

A. The minimum column width that can be specified for a VARCHAR2 data type column is one.
B. Only one LONG column can be used per table.
C. A TIMESTAMP data type column stores only time values with fractional seconds.
D. The BLOB data type column is used to store binary data in an operating system file.
E. The value for a CHAR data type column is blank-padded to the maximum defined column width.

Answer: ABE

NEW QUESTION 16
Which three tasks can be performed using SQL functions built into Oracle Database?

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 expression with a specified string
D. combining more than two columns or expressions into a single column in the output

Answer: ABC

NEW QUESTION 17
Examine the business rule:
Each student can work on multiple projects and each project can have multiple students.
You need to design an Entity Relationship Model (ERD) for optimal data storage and allow for generating reports in this format:
STUDENT_ID FIRST_NAME LAST_NAME PROJECT_ID PROJECT_NAME PROJECT_TASK
Which two statements are true in this scenario?

A. The ERD must have a 1:M relationship between the STUDENTS and PROJECTS entities.
B. The ERD must have a M:M relationship between the STUDENTS and PROJECTS entities that must be resolved into 1:M relationships.
C. STUDENT_ID must be the primary key in the STUDENTS entity and foreign key in the PROJECTS entity.
D. PROJECT_ID must be the primary key in the PROJECTS entity and foreign key in the STUDENTS entity.
E. An associative table must be created with a composite key of STUDENT_ID and PROJECT_ID, which is the foreign key linked to the STUDENTS and
PROJECTS entities.

Answer: BE

Explanation:
References:
http://www.oracle.com/technetwork/issue-archive/2011/11-nov/o61sql-512018.html

NEW QUESTION 19
You need to display the date 11-oct-2007 in words as ‘Eleventh of October, Two Thousand Seven’. Which SQL statement would give the required result?

A. SELECT TO_CHAR (TO_DATE (’11-oct-2007’), ‘fmDdthsp “of” Month, Year’)FROM DUAL


B. SELECT TO_CHAR (‘11-oct-2007’, ‘fmDdspth “of” Month, Year’)FROM DUAL
C. SELECT TO_CHAR (TO_DATE (‘11-oct-2007’), ‘fmDdspth of month, year’)FROM DUAL
D. SELECT TO_DATE (TO_CHAR (’11-oct-2007’), ‘fmDdspth “of” Month, Year’))FROM DUAL

Answer: C

NEW QUESTION 23
Examine the SQL statement used to create the TRANSACTION table. (Choose the best answer.)
SQL > CREATE TABLE transaction (trn_id char(2) primary key,
Start_date date DEFAULT SYSDATE, End_date date NOT NULL);
The value 'A1' does not exist for trn_id in this table.
Which SQL statement successfully inserts a row into the table with the default value for START_DATE?

A. INSERT INTO transaction VALUES ('A1', DEFAULT, TO_DATE(DEFAULT+10))


B. INSERT INTO transaction VALUES ('A1', DEFAULT, TO_DATE('SYSDATE+10'))
C. INSERT INTO transaction (trn_id, end_date) VALUES ('A1', '10-DEC-2014')
D. INSERT INTO transaction (trn_id, start_date, end_date) VALUES ('A1', , '10-DEC-2014')

Answer: C

NEW QUESTION 25
View the Exhibit and examine the data in the PRODUCTS table. (Choose the best answer.)

The Leader of IT Certification visit - https://www.certleader.com


100% Valid and Newest Version 1Z0-071 Questions & Answers shared by Certleader
https://www.certleader.com/1Z0-071-dumps.html (187 Q&As)

You must display product names from the PRODUCTS table that belong to the 'Software/other' category with minimum prices as either $2000 or $4000 and with
no unit of measure.
You issue this query:
SQL > SELECT prod_name, prod_category, prod_min_price FROM products
Where prod_category LIKE '%Other%' AND (prod_min_price = 2000 OR prod_min_price = 4000) AND prod_unit_of_measure <> ' ';
Which statement is true?

A. It executes successfully but returns no result.


B. It executes successfully and returns the required result.
C. It generates an error because the condition specified for PROD_UNIT_OF_MEASURE is not valid.
D. It generates an error because the condition specified for the PROD_CATEGORY column is not valid.

Answer: A

NEW QUESTION 26
Which three statements are true regarding the SQL WHERE and HAVING clauses?

A. The HAVING clause conditions can have aggregating functions.


B. The HAVING clause conditions can use aliases for the columns.
C. The WHERE and HAVING clauses cannot be used together in a SQL statement.
D. The WHERE clause is used to exclude rows before grouping data.
E. The HAVING clause is used to exclude one or more aggregated results after grouping data.

Answer: ADE

NEW QUESTION 28
Which two statements are true regarding the SQL GROUP BY clause?

A. You can use a column alias in the GROUP BY clause.


B. Using the WHERE clause after the GROUP BY clause excludes rows after creating groups.
C. The GROUP BY clause is mandatory if you are using an aggregating function in the SELECT clause.
D. Using the WHERE clause before the GROUP BY clause excludes rows before creating groups.
E. If the SELECT clause has an aggregating function, then columns without an aggregating function in the SELECT clause should be included in the GROUP BY
clause.

Answer: DE

NEW QUESTION 31
View the Exhibit and examine the structures of the employees and departments tables.

The Leader of IT Certification visit - https://www.certleader.com


100% Valid and Newest Version 1Z0-071 Questions & Answers shared by Certleader
https://www.certleader.com/1Z0-071-dumps.html (187 Q&As)

You must update the employees table according to these requirements::


-Update only those employees who work in Boston or Seattle (locations 2900 and 2700).
-Set department_id for these employees to the department id corresponding to London (locationid 2100).
-Set the employees' salary in iocation_id 2100 to 1.1 times the average salary of their department.
-Set the employees' commission In location_id 2100 to 1.5 times the average commission of their department. You issue this command:

What is the result?

A. It executes successfully but does not produce the desired update.


B. It executes successfully and produces the desired update.
C. It generates an error because multiple columns cannot be specified together in an UPDATE statement.
D. It generates an error because a subquery cannot have a join condition in an update statement.

Answer: A

NEW QUESTION 34
n the customers table, the CUST_CITY column contains the value 'Paris' for the CUST_FIRST_NAME 'Abigail'.
Evaluate the following query:

What would be the outcome?

A. Abigail PA
B. Abigail Pa
C. Abigail IS
D. An error message

Answer: B

The Leader of IT Certification visit - https://www.certleader.com


100% Valid and Newest Version 1Z0-071 Questions & Answers shared by Certleader
https://www.certleader.com/1Z0-071-dumps.html (187 Q&As)

NEW QUESTION 39
When does a transaction complete? (Choose all that apply.)

A. When a PL/SQL anonymous block is executed


B. When a DELETE statement is executed
C. When a data definition language statement is executed
D. When a TRUNCATE statement is executed after the pending transaction
E. When a ROLLBACK command is executed

Answer: CDE

NEW QUESTION 42
View the Exhibit and examine the structure of the CUSTOMERS table.

Using the CUSTOMERS table, you must generate a report that displays a credit limit increase of 15% for all customers.
Customers with no credit limit should have “Not Available” displayed. Which SQL statement would produce the required result?

A. SELECT NVL (TO_CHAR(cust_credit_limit*.15), ‘Not Available’) “NEW CREDIT” FROM customers


B. SELECT TO_CHAR(NVL(cust_credit_limit*.15), ‘Not Available’)) “NEW CREDIT” FROMcustomers
C. SELECT NVL (cust_credit_limit*.15, ‘Not Available’) “NEW CREDIT” FROM customers
D. SELECT NVL (cust_credit_limit, ‘Not Available’)*.15 “NEW CREDIT” FROM customers

Answer: C

NEW QUESTION 44
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 the SELECT list can be used in the ORDER BY clause.
D. Numeric values are displayed from the maximum to the minimum value if they have decimal positions.

Answer: A

NEW QUESTION 48
View the Exhibit and examine the structure of the PRODUCT_INFORMATION and INVENTORIES tables.

The Leader of IT Certification visit - https://www.certleader.com


100% Valid and Newest Version 1Z0-071 Questions & Answers shared by Certleader
https://www.certleader.com/1Z0-071-dumps.html (187 Q&As)

You have a requirement from the supplies department to give a list containing PRODUCT_ID, SUPPLIER_ID, and QUANTITY_ON_HAND for all the products
wherein QUANTITY_ON_HAND is less than five.
Which two SQL statements can accomplish the task? (Choose two.)

A. SELECT i.product_id, i.quantity_on_hand, pi.supplier_idFROM product_information pi JOIN inventories iON (pi.product_id=i.product_id)WHERE


quantity_on_hand < 5;
B. SELECT product_id, quantity_on_hand, supplier_idFROM product_informationNATURAL JOIN inventories AND quantity_on_hand < 5;
C. SELECT i.product_id, i.quantity_on_hand, pi.supplier_idFROM product_information pi JOIN inventories iON (pi.product_id=i.product_id) AND quantity_on_hand
< 5;
D. SELECT i.product_id, i.quantity_on_hand, pi.supplier_idFROM product_information pi JOINinventories iON (pi.product_id=i.product_id)USING (product_id)
AND quantity_on_hand < 5;

Answer: AC

NEW QUESTION 49
Which two are the minimal requirements for a self-join? (Choose two.)

A. Only equijoin conditions may be used in the query.


B. Outer joins must not be used in the query.
C. There must be a condition on which the self-join is performed.
D. No other condition except the self-join may be specified.
E. The table used for the self-join must have two different alias names in the query.

Answer: CE

NEW QUESTION 52
Which two statements are true regarding multiple-row subqueries? (Choose two.)

A. They can contain group functions.


B. They always contain a subquery within a subquery.
C. They use the < ALL operator to imply less than the maximum.
D. They can be used to retrieve multiple rows from a single table only.
E. They should not be used with the NOT IN operator in the main query if NULL is likely to be a part of the result of the subquery.

Answer: AE

NEW QUESTION 54
Examine the structure of the BOOKS_TRANSACTIONS table:

You want to display the member IDs, due date, and late fee as $2 for all transactions. Which SQL statement must you execute?

The Leader of IT Certification visit - https://www.certleader.com


100% Valid and Newest Version 1Z0-071 Questions & Answers shared by Certleader
https://www.certleader.com/1Z0-071-dumps.html (187 Q&As)

A. SELECT member_id AS "MEMBER ID", due_date AS "DUE DATE", $2 AS "LATE FEE" FROM BOOKS_TRANSACTIONS
B. SELECT member_id AS "MEMBER ID", due_date AS "DUE DATE", '$2' AS "LATE FEE" FROM BOOKS_TRANSACTIONS
C. SELECT member_id 'MEMBER ID', due_date 'DUE DATE', '$2 AS LATE FEE' FROM BOOKS_TRANSACTIONS;
D. SELECT member_id AS MEMBER_ID, due_date AS DUE_DATE, $2 AS LATE_FEE FROM BOOKS_TRANSACTIONS

Answer: B

NEW QUESTION 56
Which three statements are true about multiple-row subqueries?

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 can return only one column but multiple rows.
E. They can contain group functions and GROUP BY and HAVING clauses.
F. They can contain group functions and the GROUP BY clause, but not the HAVING clause.

Answer: ABE

NEW QUESTION 60
Examine the following query:
SQL> SELECT prod_id, amount_sold FROM sales
ORDER BY amount_sold
FETCH FIRST 5 PERCENT ROWS ONLY;
What is the output of this query?

A. It displays 5 percent of the products with the highest amount sold.


B. It displays the first 5 percent of the rows from the SALES table.
C. It displays 5 percent of the products with the lowest amount sold.
D. It results in an error because the ORDER BY clause should be the last clause.

Answer: C

Explanation:
References:
https://oracle-base.com/articles/12c/row-limiting-clause-for-top-n-queries-12cr1

NEW QUESTION 62
Examine the structure of the MEMBERS table. NameNull?Type
------------------------------------------------------------ MEMBER_IDNOT NULLVARCHAR2 (6)
FIRST_NAMEVARCHAR2 (50)
LAST_NAMENOT NULLVARCHAR2 (50)
ADDRESSVARCHAR2 (50)
CITYVARCHAR2 (25)
STATENOT NULL VARCHAR2 (3)
Which query can be used to display the last names and city names only for members from the states MO and MI?

A. SELECT last_name, city FROM members WHERE state ='MO' AND state ='MI';
B. SELECT last_name, city FROM members WHERE state LIKE 'M%';
C. SELECT last_name, city FROM members WHERE state IN ('MO', 'MI');
D. SELECT DISTINCT last_name, city FROM members WHERE state ='MO' OR state ='MI';

Answer: C

NEW QUESTION 64
View the Exhibit and examine the description of the EMPLOYEES table.

You want to calculate the total renumeration for each employee. Total renumeration is the sum of the annual salary and the percentage commission earned for a
year. Only a few employees earn commission.

The Leader of IT Certification visit - https://www.certleader.com


100% Valid and Newest Version 1Z0-071 Questions & Answers shared by Certleader
https://www.certleader.com/1Z0-071-dumps.html (187 Q&As)

Which SQL statement would you execute to get the desired output?

A. SELECT first_name, salary, salary*12+(salary*NVL2 (commission_pct, salary,salary+commission_pct))“Total”FROM EMPLOYEES;


B. SELECT first_name, salary, salary*12+salary*commission_pct “Total”FROM EMPLOYEES;
C. SELECT first_name, salary (salary + NVL (commission_pct, 0)*salary)*12 “Total”FROM EMPLOYEES;
D. SELECT first_name, salary*12 + NVL(salary,0)*commission_pct, “Total”FROM EMPLOYEES;

Answer: A

NEW QUESTION 69
Sales data of a company is stored in two tables, SALES1 and SALES2, with some data being duplicated across the tables. You want to display the results from the
SALES1 table, which are not present in the SALES2 table.
SALES1 table NameNullType
----------------------------------------------- SALES_IDNUMBER STORE_IDNUMBER ITEMS_IDNUMBER QUANTITYNUMBER SALES_DATEDATE
SALES2 table NameNullType
---------------------------------------------- SALES_IDNUMBER STORE_IDNUMBER
ITEMS_IDNUMBER QUANTITYNUMBER SALES_DATEDATE
Which set operator generates the required output?

A. INTERSECT
B. UNION
C. PLUS
D. MINUS
E. SUBTRACT

Answer: D

Explanation:
References:
https://docs.oracle.com/cd/B19306_01/server.102/b14200/queries004.htm

NEW QUESTION 73
Examine the structure of the BOOKS_ TRANSACTIONS table:

Examine the SQL statement:

Which statement is true about the outcome?

A. It displays details only for members who have borrowed before today with RM as TRANSACTION_TYPE.
B. It displays details for members who have borrowed before today's date with either RM asTRANSACTION_TYPE or MEMBER_ID as A101 and A102.
C. It displays details for only members A101and A102 who have borrowed before today with RM as TRANSACTION_TYPE.
D. It displays details for members who have borrowed before today with RM as TRANSACTION_TYPE and the details for members A101 or A102.

Answer: A

NEW QUESTION 77
Which two statements are true regarding constraints? (Choose two.)

A. All constraints can be defined at the column level and at the table level.
B. A constraint can be disabled even if the constraint column contains data.
C. A column with the UNIQUE constraint can contain NULLS.
D. A foreign key column cannot contain NULLS.
E. A constraint is enforced only for INSERT operations.

Answer: BC

NEW QUESTION 82
View the Exhibit and examine the details of PRODUCT_INFORMATION table.
PRODUCT_NAME CATEGORY_ID SUPPLIER_ID
Inkjet C/8/HQ 12
102094
Inkjet C/4 12
102090
LaserPro 600/6/BW 12
102087
LaserPro 1200/8/BW 12

The Leader of IT Certification visit - https://www.certleader.com


100% Valid and Newest Version 1Z0-071 Questions & Answers shared by Certleader
https://www.certleader.com/1Z0-071-dumps.html (187 Q&As)

102099
Inkjet B/6 12
102096
Industrial 700/ID 12
102086
Industrial 600/DQ 12
102088
Compact 400/LQ 12
102087
Compact 400/DQ 12
102088
HD 12GB /R 13
102090
HD 10GB /I 13
102071
HD 12GB @7200 /SE 13
102057
HD 18.2GB @10000 /E 13
102078
HD 18.2GB @10000 /I 13
102050
HD 18GB /SE 13
102083
HD 6GB /I 13
102072
HD 8.2GB@5400 13
102093
You have the requirement to display PRODUCT_NAME from the table where the CATEGORY_ID column has values 12 or 13, and the SUPPLIER_ID column has
the value 102088. You executed the following SQL statement:
SELECT product_name FROM product_information
WHERE (category_id = 12 AND category_id = 13) AND supplier_id = 102088; Which statement is true regarding the execution of the query?

A. It would not execute because the same column has been used in both sides of the AND logical operator to form the condition.
B. It would not execute because the entire WHERE clause condition is not enclosed within the parentheses.
C. It would execute and the output would display the desired result.
D. It would execute but the output would return no rows.

Answer: D

NEW QUESTION 83
Examine the structure of the EMPLOYEES table. (Choose the best answer.)

You must display the details of employees who have manager with MANAGER_ID 100, who were hired in the past 6 months and who have salaries greater than
10000.

A. SELECT last_name, hire_date, salaryFROM employeesWHERE salary > 10000UNION ALL SELECT last_name, hire_date, salaryFROM employeesWHERE
manager_ID = (SELECT employee_id FROM employees WHERE employee_id = 100)INETRSECTSELECT last_name, hire_date, salaryFROM employees
WHERE hire_date > SYSDATE- 180;
B. SELECT last_name, hire_date, salaryFROM employeesWHERE manager_id = (SELECT employee_id FROM employees WHERE employee_id = 100)UNION
ALL(SELECT last_name, hire_date, salaryFROM employeesWHERE hire_date > SYSDATE -180INTERSECTSELECT last_name, hire_date, salaryFROM
employeesWHERE salary > 10000);
C. SELECT last_name, hire_date, salaryFROM employeesWHERE manager_id = (SELECT employee_id FROM employees WHERE employee_id =
'100')UNIONSELECT last_name, hire_date, salaryFROM employeesWHERE hire_date > SYSDATE -180INTERSECTSELECT last_name, hire_date, salaryFROM
employeesWHERE salary > 10000;
D. (SELECT last_name, hire_date, salaryFROM employeesWHERE salary > 10000UNION ALLSELECT last_name, hire_date, salaryFROM employeesWHERE
manager_ID = (SELECT employee_id FROM employees WHERE employee_id = 100))UNIONSELECT last_name, hire_date, salaryFROM employeesWHERE
hire_date > SYSDATE -180;

Answer: C

NEW QUESTION 85
Which three statements are true regarding single-row functions? (Choose three.)

A. The data type returned, can be different from the data type of the argument that is referenced.

The Leader of IT Certification visit - https://www.certleader.com


100% Valid and Newest Version 1Z0-071 Questions & Answers shared by Certleader
https://www.certleader.com/1Z0-071-dumps.html (187 Q&As)

B. They can return multiple values of more than one data type.
C. They can accept only one argument.
D. They can be nested up to only two levels.
E. They can be used in SELECT, WHERE, and ORDER BY clauses.
F. They can accept column names, expressions, variable names, or a user-supplied constants as arguments.

Answer: AEF

NEW QUESTION 87
Which three statements are true regarding subqueries? (Choose three.)

A. The ORDER BY Clause can be used in a subquery.


B. A subquery can be used in the FROM clause of a SELECT statement.
C. If a subquery returns NULL, the main query may still return rows.
D. A subquery can be placed in a WHERE clause, a GROUP BY clause, or a HAVING clause.
E. Logical operators, such as AND, OR and NOT, cannot be used in the WHERE clause of a subquery.

Answer: ABC

NEW QUESTION 88
In which three situations does a transaction complete?

A. when a PL/SQL anonymous block is executed


B. when a DELETE statement is executed
C. when a ROLLBACK command is executed
D. when a data definition language (DDL) statement is executed
E. when a TRUNCATE statement is executed after the pending transaction

Answer: CDE

Explanation:
References:
https://docs.oracle.com/cd/B19306_01/server.102/b14220/transact.htm

NEW QUESTION 91
Which two statements are true about sequences crated in a single instance Oracle database?

A. The numbers generated by an explicitly defined sequence can only be used to insert data in one table.
B. DELETE <sequencename> would remove a sequence from the database.
C. CURRVAL is used to refer to the most recent sequence number that has been generated for a particular sequence.
D. When the MAXVALUE limit for a sequence is reached, it can be increased by using the ALTER SEQUENCE statement.
E. When the database instance shuts down abnormally, sequence numbers that have been cached but not used are available again when the instance is
restarted.

Answer: CD

NEW QUESTION 93
Which statement is true about an inner join specified in the WHERE clause of a query?

A. It must have primary-key and foreign-key constraints defined on the columns used in the join condition.
B. It requires the column names to be the same in all tables used for the join conditions.
C. It is applicable for equijoin and nonequijoin conditions.
D. It is applicable for only equijoin conditions.

Answer: C

NEW QUESTION 95
View and Exhibit and examine the structure and data in the INVOICE table. (Choose two.)

Which two statements are true regarding data type conversion in query expressions?

A. inv_date = '15-february-2008' :uses implicit conversion


B. inv_amt = '0255982' : requires explicit conversion
C. inv_date > '01-02-2008' : uses implicit conversion
D. CONCAT(inv_amt, inv_date) : requires explicit conversion
E. inv_no BETWEEN '101' AND '110' : uses implicit conversion

The Leader of IT Certification visit - https://www.certleader.com


100% Valid and Newest Version 1Z0-071 Questions & Answers shared by Certleader
https://www.certleader.com/1Z0-071-dumps.html (187 Q&As)

Answer: AE

NEW QUESTION 99
View the exhibit and examine the description of the EMPLOYEES table. (Choose two.)

You executed this SQL statement: SELECT first_name, department_id, salary FROM employees
ORDER BY department_id, first_name, salary desc; Which two statements are true regarding the result?

A. The values in the SALARY column would be returned in descending order for all employees having the same value in the DEPARTMENT_ID and FIRST_NAME
column.
B. The values in the FIRST_NAME column would be returned in ascending order for all employees having the same value in the DEPARTMENT_ID column.
C. The values in the SALARY column would be returned in descending order for all employees having the same value in the DEPARTMENT_ID column.
D. The values in the all columns would be returned in descending order.
E. The values in the FIRST_NAME column would be returned in descending order for all employees having the same value in the DEPARTMENT_ID column.

Answer: AB

NEW QUESTION 103


Examine the structure of the SALES table. (Choose two.)

Examine this statement:


SQL > CREATE TABLE sales1 (prod_id, cust_id, quantity_sold, price) AS
SELECT product_id, customer_id, quantity_sold, price FROM sales
WHERE 1 = 2;
Which two statements are true about the SALES1 table?

A. It will not be created because the column-specified names in the SELECT and CREATE TABLE clauses do not match.
B. It will have NOT NULL constraints on the selected columns which had those constraints in the SALES table.
C. It will not be created because of the invalid WHERE clause.
D. It is created with no rows.
E. It has PRIMARY KEY and UNIQUE constraints on the selected columns which had those constraints in the SALES table.

Answer: BD

NEW QUESTION 108


View the Exhibit and examine the structure of the ORDER_ITEMS table. (Choose the best answer.)

The Leader of IT Certification visit - https://www.certleader.com


100% Valid and Newest Version 1Z0-071 Questions & Answers shared by Certleader
https://www.certleader.com/1Z0-071-dumps.html (187 Q&As)

You must select the ORDER_ID of the order that has the highest total value among all the orders in the ORDER_ITEMS table.
Which query would produce the desired result?

A. SELECT order_idFROM order_itemsGROUP BY order_idHAVING SUM(unit_price*quantity) = (SELECT MAX (SUM(unit_price*quantity))FROM order_items


GROUP BY order_id);
B. SELECT order_idFROM order_itemsWHERE(unit_price*quantity) = (SELECT MAX (SUM(unit_price*quantity)FROM order_items) GROUP BY order_id);
C. SELECT order_idFROM order_itemsWHERE(unit_price*quantity) = MAX(unit_price*quantity)GROUP BY order_id);
D. SELECT order_idFROM order_itemsWHERE (unit_price*quantity) = (SELECT MAX(unit_price*quantity)FROM order_itemsGROUP BY order_id)

Answer: A

NEW QUESTION 112


Evaluate the following CREATE TABLE command:

Which statement is true regarding the above SQL statement?

A. It would execute successfully and only ORD_ITM_IDX index would be created.


B. It would give an error because the USING INDEX clause cannot be used on a composite primary.
C. It would execute successfully and two indexes ORD_ITM_IDX and ORD_ITM_ID PK would be created.
D. It would give an error because the USING INDEX is not permitted in the CRETAE TABLE command.

Answer: A

NEW QUESTION 114


Examine this SELECT statement and view the Exhibit to see its output: (Choose two.)

The Leader of IT Certification visit - https://www.certleader.com


100% Valid and Newest Version 1Z0-071 Questions & Answers shared by Certleader
https://www.certleader.com/1Z0-071-dumps.html (187 Q&As)

SELECT constraints_name, constraints_type, search_condition, r_constraints_name, delete_rule, status, FROM user_constraints


WHERE table_name = 'ORDERS';
Which two statements are true about the output?

A. The DELETE_RULE column indicates the desired state of related rows in the child table when the corresponding row is deleted from the parent table.
B. The R_CONSTRAINT_NAME column contains an alternative name for the constraint.
C. In the second column, 'c' indicates a check constraint.
D. The STATUS column indicates whether the table is currently in use.

Answer: AC

NEW QUESTION 116


View the Exhibit and examine the structure in the EMPLOYEES tables.

Evaluate the following SQL statement: SELECT employee_id, department_id FROM employees
WHERE department_id= 50 ORDER BY department_id UNION
SELECT employee_id, department_id FROM employees
WHERE department_id=90 UNION
SELECT employee_id, department_id
FROM employees
WHERE department_id=10;
What would be the outcome of the above SQL statement?

A. The statement would not execute because the positional notation instead of the column name should be used with the ORDER BY clause.
B. The statement would execute successfully and display all the rows in the ascending order of DEPARTMENT_ID.
C. The statement would execute successfully but it will ignore the ORDER BY clause and display the rows in random order.
D. The statement would not execute because the ORDER BY clause should appear only at the end of the SQL statement, that is, in the last SELECT statement.

Answer: D

NEW QUESTION 118


Examine the structure of the MEMBERS table: NameNull?Type
------------------ --------------- ------------------------------ MEMBER_IDNOT NULLVARCHAR2 (6)
FIRST_NAMEVARCHAR2 (50)
LAST_NAMENOT NULLVARCHAR2 (50)
ADDRESSVARCHAR2 (50)
You execute the SQL statement:
SQL > SELECT member_id, ' ' , first_name, ' ' , last_name "ID FIRSTNAME LASTNAME " FROM members;
What is the outcome?

A. It fails because the alias name specified after the column names is invalid.
B. It fails because the space specified in single quotation marks after the first two column names is invalid.
C. It executes successfully and displays the column details in a single column with only the alias column heading.
D. It executes successfully and displays the column details in three separate columns and replaces only the last column heading with the alias.

Answer: D

The Leader of IT Certification visit - https://www.certleader.com


100% Valid and Newest Version 1Z0-071 Questions & Answers shared by Certleader
https://www.certleader.com/1Z0-071-dumps.html (187 Q&As)

NEW QUESTION 122


Which three statements are true regarding the WHERE and HAVING clauses in a SQL statement? (Choose three.)

A. WHERE and HAVING clauses cannot be used together in a SQL statement.


B. The HAVING clause conditions can have aggregate functions.
C. The HAVING clause conditions can use aliases for the columns.
D. The WHERE clause is used to exclude rows before the grouping of data.
E. The HAVING clause is used to exclude one or more aggregated results after grouping data.

Answer: ABD

NEW QUESTION 124


Which two statements are true regarding single row functions? (Choose two.)

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. SYSDATE : returns the database server current date and time.
E. INSTR : can be used to find only the first occurrence of a character in a string.
F. TRIM : can be used to remove all the occurrences of a character from a string.

Answer: BD

NEW QUESTION 126


......

The Leader of IT Certification visit - https://www.certleader.com


100% Valid and Newest Version 1Z0-071 Questions & Answers shared by Certleader
https://www.certleader.com/1Z0-071-dumps.html (187 Q&As)

Thank You for Trying Our Product

* 100% Pass or Money Back


All our products come with a 90-day Money Back Guarantee.
* One year free update
You can enjoy free update one year. 24x7 online support.
* Trusted by Millions
We currently serve more than 30,000,000 customers.
* Shop Securely
All transactions are protected by VeriSign!

100% Pass Your 1Z0-071 Exam with Our Prep Materials Via below:

https://www.certleader.com/1Z0-071-dumps.html

The Leader of IT Certification visit - https://www.certleader.com


Powered by TCPDF (www.tcpdf.org)

You might also like