1Z0-071 Dumps Oracle Database 12c SQL: 100% Valid and Newest Version 1Z0-071 Questions & Answers Shared by Certleader
1Z0-071 Dumps Oracle Database 12c SQL: 100% Valid and Newest Version 1Z0-071 Questions & Answers Shared by Certleader
1Z0-071 Dumps
https://www.certleader.com/1Z0-071-dumps.html
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?
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?
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
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?
Answer: B
NEW QUESTION 9
Which statement is true regarding the USING clause in table joins? (Choose two.)
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.
Answer: ABD
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.)
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?
Answer: B
NEW QUESTION 13
View the Exhibit and examine, the description for the SALES and CHANNELS tables. (Choose the best answer.)
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?
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?
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?
Answer: C
NEW QUESTION 25
View the Exhibit and examine the data in the PRODUCTS table. (Choose the best answer.)
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?
Answer: A
NEW QUESTION 26
Which three statements are true regarding the SQL WHERE and HAVING clauses?
Answer: ADE
NEW QUESTION 28
Which two statements are true regarding the SQL GROUP BY clause?
Answer: DE
NEW QUESTION 31
View the Exhibit and examine the structures of the employees and departments tables.
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:
A. Abigail PA
B. Abigail Pa
C. Abigail IS
D. An error message
Answer: B
NEW QUESTION 39
When does a transaction complete? (Choose all that apply.)
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?
Answer: C
NEW QUESTION 44
Which statement is true regarding the default behavior of the ORDER BY clause?
Answer: A
NEW QUESTION 48
View the Exhibit and examine the structure of the PRODUCT_INFORMATION and INVENTORIES tables.
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.)
Answer: AC
NEW QUESTION 49
Which two are the minimal requirements for a self-join? (Choose two.)
Answer: CE
NEW QUESTION 52
Which two statements are true regarding multiple-row subqueries? (Choose two.)
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?
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?
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?
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.
Which SQL statement would you execute to get the desired output?
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:
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
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.
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.)
Answer: ABC
NEW QUESTION 88
In which three situations does a transaction complete?
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?
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
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
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?
Answer: A
Answer: A
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
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
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
Answer: ABD
Answer: BD
100% Pass Your 1Z0-071 Exam with Our Prep Materials Via below:
https://www.certleader.com/1Z0-071-dumps.html