[Nov 12, 2024] Uplift Your 1z0-071 Exam Marks With The Help of 1z0-071 Dumps [Q114-Q135]

Share

[Nov 12, 2024] Uplift Your 1z0-071 Exam Marks With The Help of 1z0-071 Dumps

Use Oracle 1z0-071 Dumps To Succeed Instantly in 1z0-071 Exam

NEW QUESTION # 114
Which two statements are true regarding the WHERE and HAVING clauses in a SELECT statement?
(Choose two.)

  • A. The aggregate functions and columns used in the HAVING clause must be specified in the SELECT list of the query.
  • B. The WHERE clause can be used to exclude rows before dividing them into groups.
  • C. The HAVING clause can be used with aggregate functions in subqueries.
  • D. The WHERE clause can be used to exclude rows after dividing them into groups.
  • E. The WHERE and HAVING clauses can be used in the same statement only if they are applied to different columns in the table.

Answer: C,D


NEW QUESTION # 115
The EMPLOYEES table contains columns EMP_ID of data type NUMBER and HIRE_DATE of data type DATE You want to display the date of the first Monday after the completion of six months since hiring.
The NLS_TERRITORY parameter is set to AMERICA in the session and, therefore, Sunday is the first day of the week Which query can be used?

  • A. SELECT emp_id,NEXT_DAY(ADD_MONTHS(hire_date,6),1) FROM employees;
  • B. SELECT emp_id,NEXT_DAY(MONTHS_BETWEEN(hire_date,SYSDATE),6) FROM employees;
  • C. SELECT emp_id,ADD_MONTHS(hire_date,6), NEXT_DAY('MONDAY') FROM employees;
  • D. SELECT emp_id,NEXT_DAY(ADD_MONTHS(hite_date,6),'MONDAY') FROM employees;

Answer: D

Explanation:
The function ADD_MONTHS(hire_date, 6) adds 6 months to the hire_date. The function NEXT_DAY(date, 'day_name') finds the date of the first specified day_name after the date given. In this case, 'MONDAY' is used to find the date of the first Monday after the hire_date plus 6 months.
Option A is correct as it accurately composes both ADD_MONTHS and NEXT_DAY functions to fulfill the requirement.
Options B, C, and D do not provide a valid use of the NEXT_DAY function, either because of incorrect syntax or incorrect logic in calculating the required date.
The Oracle Database SQL Language Reference for 12c specifies how these date functions should be used.


NEW QUESTION # 116
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 TO_CHAR(NVL(cust_credit_limit*.15), 'Not Available')) "NEW CREDIT" FROM customers
  • B. SELECT NVL (cust_credit_limit*.15, 'Not Available') "NEW CREDIT" FROM customers
  • C. SELECT NVL (cust_credit_limit, 'Not Available')*.15 "NEW CREDIT" FROM customers
  • D. SELECT NVL (TO_CHAR(cust_credit_limit*.15), 'Not Available') "NEW CREDIT" FROM customers

Answer: B


NEW QUESTION # 117
Which two statements are true regarding views? (Choose two.)

  • A. Rows added through a view are deleted from the table automatically when the view is dropped.
  • B. A subquery used in a complex view definition cannot contain group functions or joins.
  • C. The OR REPLACEoption is used to change the definition of an existing view without dropping and re- creating it.
  • D. A simple view in which column aliases have been used cannot be updated.
  • E. Rows cannot be deleted through a view if the view definition contains the DISTINCTkeyword.
  • F. The WITH CHECK OPTIONconstraint can be used in a view definition to restrict the columns displayed through the view.

Answer: C,E


NEW QUESTION # 118
Examine the description of the BOOKS_TRANSACTIONS table:

Examine this partial SQL statement:
SELECT * FROM books_transactions
Which two WHERE conditions give the same result?

  • A. WHERE (borrowed_date = SYSDATE AND transaction_type = 'RM') OR member_id IN ('A101', 'A102');
  • B. WHERE borrowed_date = SYSDATE AND transaction_type = 'RM' OR member_id IN ('A101', 'A102');
  • C. WHERE borrowed_date = SYSDATE AND (transaction_type = 'RM' AND member_id = 'A101' OR member_id = 'A102');
  • D. WHERE borrowed_date = SYSDATE AND (transaction_type = 'RM' OR member_id IN ('A101', 'A102'));
  • E. WHERE borrowed_date = SYSDATE AND (transaction_type = 'RM' AND (member_id = A101' OR member_id = 'A102'));

Answer: A,E


NEW QUESTION # 119
* MANAGER is an existing role with no privileges or roles.
* EMP is an existing role containing the CREATE TABLEprivilege.
* EMPLOYEES is an existing table in the HR schema.
Which two commands execute successfully?

  • A. GRANT SELECT, INSERT ON hr.employees TO manager WITH GRANT OPTION;
  • B. GRANT CREATE TABLE, emp TP manager;
  • C. GRANT CREATE TABLE, SELECT ON hr.employees TO manager;
  • D. GRANT CREATE ANY SESSION, CREATE ANY TABLE TO manager;
  • E. GRANT CREATE SEQUENCE TO manager, emp;

Answer: A,E


NEW QUESTION # 120
Which three statements are true about dropping and unused columns in an Oracle database?

  • A. A column that is set to unused still counts towards the limit of 1000 columns per table.
  • B. A primary key column referenced by another column as a foreign key can be dropped if using the cascade option.
  • C. A drop column command can be rolled back.
  • D. An unused column's space is reclaimed automatically when the block containing that column is next queried.
  • E. An unused column's space is reclaimed automatically when the row containing that column is next queried.
  • F. Partition key columns cannot be dropped.

Answer: A,D,F


NEW QUESTION # 121
BOOK_SEQ is an existing sequence in your schema.
Which two CREATE TABLE commands are valid?
A)

B)

C)

D)

E)

  • A. Option D
  • B. Option C
  • C. Option B
  • D. Option E
  • E. Option A

Answer: C,D


NEW QUESTION # 122
View the exhibit and examine the structure of ORDERS and CUSTOMERS tables.
ORDERS
Name
Null?
Type
ORDER_ID
NOT NULL
NUMBER(4)
ORDER_DATE
NOT NULL
DATE
ORDER_MODE
VARCHAR2(8)
CUSTOMER_ID
NOT NULL
NUMBER(6)
ORDER_TOTAL
NUMBER(8, 2)
CUSTOMERS
Name
Null?
Type
CUSTOMER_ID
NOT NULL
NUMBER(6)
CUST_FIRST_NAME
NOT NULL
VARCHAR2(20)
CUST_LAST_NAME
NOT NULL
VARCHAR2(20)
CREDIT_LIMIT
NUMBER(9,2)
CUST_ADDRESS
VARCHAR2(40)
Which INSERT statement should be used to add a row into the ORDERS table for the customer whose CUST_LAST_NAME is Roberts and CREDIT_LIMIT is 600? Assume there exists only one row with CUST_LAST_NAME as Roberts and CREDIT_LIMIT as 600.

  • A. INSERT INTO orders (order_id, order_date, order_mode,(SELECT customer_idFROM customersWHERE cust_last_name='Roberts' AND credit_limit=600), order_total);VALUES (1,'10-mar-2007', 'direct', &customer_id, 1000);
  • B. INSERT INTO (SELECT o.order_id, o.order_date, o.order_mode, c.customer_id, o.order_totalFROM orders o, customers cWHERE o.customer_id = c.customer_id AND c.cust_last_name='Roberts' AND c.credit_limit=600)VALUES (1,'10-mar-2007', 'direct', (SELECT customer_idFROM customersWHERE cust_last_name='Roberts' AND credit_limit=600), 1000);
  • C. INSERT INTO orders (order_id, order_date, order_mode,(SELECT customer idFROM customersWHERE cust_last_name='Roberts' AND credit_limit=600), order_total);VALUES (1,'10-mar-2007', 'direct', &customer_id, 1000);
  • D. INSERT INTO ordersVALUES (1,'10-mar-2007', 'direct',(SELECT customer_idFROM customersWHERE cust_last_name='Roberts' AND credit_limit=600), 1000);

Answer: D


NEW QUESTION # 123
Which three are true about dropping columns from a table?

  • A. A column drop is implicitly committed
  • B. Multiple columns can be dropped simultaneously using the ALTER TABLE command.
  • C. A column can be removed only if it contains no data.
  • D. A column must be set as unused before it is dropped from a table.
  • E. A primary key column cannot be dropped.
  • F. A column that is referenced by another column in any other table cannot be dropped.

Answer: A,E,F

Explanation:
In Oracle Database 12c, the operations related to dropping columns from a table include several behaviors, each specified clearly in Oracle documentation and best practices:
* B. A column drop is implicitly committed: Dropping a column in Oracle using the ALTER TABLE
... DROP COLUMN command is a DDL (Data Definition Language) operation, which means it cannot be rolled back. DDL commands in Oracle are automatically and implicitly committed, meaning that once a column is dropped, the action is finalized immediately.
* C. A column that is referenced by another column in any other table cannot be dropped: In Oracle, if a column is being referenced by a foreign key constraint or any dependency from another table, you cannot directly drop it until those references are removed or disabled. This ensures data integrity across related tables.
* E. A primary key column cannot be dropped: The primary key constraint is critical for identifying unique rows within a table. Oracle does not allow the dropping of columns that are part of a primary key without first dropping the constraint or modifying it to exclude the column you intend to drop.
References:
* Oracle Database SQL Language Reference 12c, specifically sections discussing DDL operations and constraints.
In Oracle Database 12c, the operations related to dropping columns from a table include several behaviors, each specified clearly in Oracle documentation and best practices:
* B. A column drop is implicitly committed: Dropping a column in Oracle using the ALTER TABLE
... DROP COLUMN command is a DDL (Data Definition Language) operation, which means it cannot be rolled back. DDL commands in Oracle are automatically and implicitly committed, meaning that once a column is dropped, the action is finalized immediately.
* C. A column that is referenced by another column in any other table cannot be dropped: In Oracle, if a column is being referenced by a foreign key constraint or any dependency from another table, you cannot directly drop it until those references are removed or disabled. This ensures data integrity across related tables.
* E. A primary key column cannot be dropped: The primary key constraint is critical for identifying unique rows within a table. Oracle does not allow the dropping of columns that are part of a primary key without first dropping the constraint or modifying it to exclude the column you intend to drop.
References:
* Oracle Database SQL Language Reference 12c, specifically sections discussing DDL operations and constraints.


NEW QUESTION # 124
Examine this SQL statement:

Which two are true?

  • A. The subquery is executed for every row in the EMPLOYEEStable.
  • B. The subquery is not a correlated subquery.
  • C. The subquery is executed before the DELETEstatement is executed.
  • D. All existing rows in the EMPLOYEEStable are deleted.
  • E. The DELETE statement executes successfully even if the subquery selects multiple rows.

Answer: A,C


NEW QUESTION # 125
You need to produce a report where each customer's credit limit has been incremented by $1000. In the output, the customer's last name should have the heading Nameand the incremented credit limit should be labeled New Credit Limit. The column headings should have only the first letter of each word in uppercase.
Which statement would accomplish this requirement?

  • A. SELECT cust_last_name AS "Name", cust_credit_limit + 1000
    AS "New Credit Limit"
    FROM customers;
  • B. SELECT cust_last_name AS Name, cust_credit_limit + 1000
    AS New Credit Limit
    FROM customers;
  • C. SELECT cust_last_name AS Name, cust_credit_limit + 1000
    "New Credit Limit"
    FROM customers;
  • D. SELECT INITCAP (cust_last_name) "Name", cust_credit_limit + 1000
    INITCAP ("NEW CREDIT LIMIT")
    FROM customers;

Answer: A


NEW QUESTION # 126
View the Exhibit and examine the structure of the PROMOTIONS table.
Evaluate the following SQL statement:
Which statement is true regarding the outcome of the above query?

  • A. It shows COST_REMARK for all the promos in the promo category 'TV'.
  • B. It produces an error because subqueries cannot be used with the CASE expression.
  • C. It produces an error because the subquery gives an error.
  • D. It shows COST_REMARK for all the promos in the table.

Answer: D


NEW QUESTION # 127
Which two statements are true about the ORDER BY clause when used with a SQL statement containing a SET operator such as UNION?

  • A. Each SELECT statement in the compound query must have its own ORDER BY clause.
  • B. Column positions must be used in the ORDER BY clause.
  • C. Each SELECT statement in the compound query can have its own ORDER BY clause.
  • D. Only column names from the first SELECT statement in the compound query are recognized.
  • E. The first column in the first SELECT of the compound query with the UNION operator is used by default to sort output in the absence of an ORDER BY clause.

Answer: D,E


NEW QUESTION # 128
Examine the description of the countries table:

Examine the description of the departments table:

Examine the description of the locations table:

Which two queries will return a list of countries with no departments?

  • A.
  • B.
  • C.
  • D.

Answer: A,B

Explanation:
The query's goal is to return a list of countries that have no departments linked to them.
Option B and Option D are the correct answers because they use set operations that will effectively return countries that do not have a corresponding entry in the departments table:
* Option B uses the NOT IN subquery to exclude countries that have departments linked to them. It looks for country_id values in the countries table that are not present in the list of country_id values associated with locations that are, in turn, associated with departments. This will correctly return countries that have no departments.
* Option D uses the MINUS set operator, which subtracts the results of the second SELECT statement from the results of the first. This statement will return all countries from the countries table minus those that have an associated department_id in the departments table, effectively listing countries with no departments.
Option A and Option C are incorrect because:
* Option A will not execute successfully as it tries to join tables using a column (country_id) that doesn't exist in the departments table, which will lead to an error.
* Option C's use of INTERSECT is incorrect for this requirement. INTERSECT returns only the rows that exist in both queries. Since we want countries with no departments, using INTERSECT would actually return the opposite of what is required.
References:
* Oracle Documentation on NOT IN clause: SQL Language Reference - Subquery
* Oracle Documentation on MINUS operator: SQL Language Reference - Set Operators Therefore, the correct options are B and D, which use subquery exclusion and the MINUS set operator, respectively, to accurately identify and return countries without departments.


NEW QUESTION # 129
Examine the ORDER _ITEms table:

Which two queries return rows where QUANTITY is a multiple of ten?

  • A. SELECT * FROM order_ items WHERE MOD (quantity, 10) = 0;
  • B. SELECT" FROM order_ _items WHERE quantity = ROUND (quantity, 1);
  • C. SELECT FROM order_ items WHERE quantity / 10 = TRUNC (quantity);
  • D. SELECT * FROM order_ items WHERE quantity = TRUNC (quantity, -1);
  • E. SELECT" FROM order_ items WHERE FLOOR (quantity / 10) = TRUNC (quantity / 10);

Answer: A,D


NEW QUESTION # 130
Examine this business rule:
Each student can work on multiple projects and each project can have multiple students.
You must design an Entity Relationship(ER) model for optimal data storage and allow for generating reports in this format:

Which two statements are true?

  • A. The ER must have a many to-many relationship between the STUDENTS and PROJECTS entities that must be resolved into 1-to-many relationships.
  • B. An associative table must be created with a composite key of STUDENT_ID and PROJRCT_ID, which is the foreign key linked to the STUDENTS and PROJECTS entities.
  • 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. The ER must have a 1-to-many relationship between the STUDENTS and PROJECTS entities.

Answer: A,B


NEW QUESTION # 131
The SYSDATEfunction displays the current Oracle Server date as:
21-MAY-19
You wish to display the date as:
MONDAY, 21 MAY, 2019
Which statement will do this?
SELECT TO_DATE(SYSDATE, 'FMDAY, DD MONTH, YYYY') FROM DUAL;

  • A. SELECT TO_CHAR(SYSDATE, 'FMDAY, DD MONTH, YYYY') FROM DUAL;
  • B. SELECT TO_CHAR(SYSDATE, 'FMDD, DAY MONTH, YYYY') FROM DUAL;
  • C.
  • D. SELECT TO_CHAR(SYSDATE, 'FMDAY, DDTH MONTH, YYYY') FROM DUAL;

Answer: C

Explanation:
SELECT ID, TO_CHAR(Start_Date,'fmDay Month fmDD, YYYY') AS "Start Date" FROM Employee; Reference: http://www.java2s.com/Code/Oracle/Data-Type/ TOCHARDatefmDayMonthfmDDYYYYEmbeddedspacescanberemovedbyplacingthefmprefix.htm


NEW QUESTION # 132
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 the location of all current as well as previous customers who are no longer active with the company.
You need to find those customers who have never changed their address.
Which SET operator would you use to get the required output?

  • A. UNION ALL
  • B. INTERSECT
  • C. MINUS
  • D. UNION

Answer: C


NEW QUESTION # 133
Examine the description of the SALES1 table:

SALES2 is a table with the same description as SALES1.
Some sales data is duplicated in both tables.
You want to display the rows from the SALES1 table which are not present in the SALES2 table.
Which set operator generates the required output?

  • A. UNION ALL
  • B. SUBTRACT
  • C. INTERSECT
  • D. MINUS
  • E. UNION

Answer: D


NEW QUESTION # 134
Examine the data in the CUST_NAME column of the CUSTOMERS table.

You want to extract only those customer names that have three names and display the * symbol in place of the first name as follows:

Which two queries give the required output?

  • A. SELECT LPAD(SUBSTR(cust_name, INSTR (cust_name ' ')),LENGTH(cust_name) - INSTR(cust_name, ' '), '*') "CUST NAME"FROM customersWHERE INSTR(cust_name, ' ',1,2)<>0;
  • B. SELECT LPAD(SUBSTR(cust_name, INSTR(cust_name, ' ')),LENGTH(cust_name),'*') "CUST NAME"FROM customersWHERE INSTR(cust_name, ' ',-1,2)<>0;
  • C. SELECT LPAD(SUBSTR(cust_name, INSTR(cust_name, ' ')),LENGTH(cust_name),'*') "CUST NAME"FROM customersWHERE INSTR(cust_name, ' ',1,2)<>0;
  • D. SELECT LPAD(SUBSTR(cust_name, INSTR (cust_name ' ')),LENGTH(cust_name) - INSTR(cust_name, ' '), '*') "CUST NAME"FROM customersWHERE INSTR(cust_name, ' ',1,-2)<>0;

Answer: B,C


NEW QUESTION # 135
......

Oracle Dumps - Learn How To Deal With The Exam Anxiety: https://www.testsdumps.com/1z0-071_real-exam-dumps.html

Ultimate Guide to 1z0-071 Dumps - Enhance Your Future Career Now: https://drive.google.com/open?id=1ujSLg0qgPbrIM0Sflgu5GhfQ9Ftyb7br