1z0-071 Premium Files Updated Dec-2024 Practice Valid Exam Dumps Question [Q23-Q42]

Share

1z0-071 Premium Files Updated Dec-2024 Practice Valid Exam Dumps Question

Practice with 1z0-071 Dumps for Oracle PL/SQL Developer Certified Associate Certified Exam Questions & Answer

NEW QUESTION # 23
Examine the description of the EMPLOYEES table:

NLS_DATE FORMAT is DD-MON-RR.
Which two queries will execute successfully?

  • A. SELECT dept_ id, AVG(MAX(salary)) FROM employees GROUP BY dept_id, salary;
  • B. SELECT dept_ id, AVG (MAX(salary)) FROM employees GROUP By dept_id HAVING hire_date> ' O1-JAN-19';
  • C. SELECT dept_ iD, sum(salary) FROM employees WHERE hire_date > '01-JAN-9' GROUP BY dept_id;
  • D. SELECT AVG(MAX(salary)) FROM employees GROUP BY salary;
  • E. SELECT dept id, MAX (SUM(salary)) FROM employees GROUP BY dept_id;

Answer: C

Explanation:
In Oracle SQL, aggregation functions such as AVG and MAX cannot be nested directly inside each other and must be used in conjunction with GROUP BY on the column(s) that are not included in the aggregate function.
Also, the HAVING clause filters groups after aggregation is applied.
A). This query will not execute successfully because it improperly nests MAX inside AVG. Oracle SQL does not allow this type of nested aggregation without a subquery.
B). This query will not execute successfully for the same reason as A, it improperly nests MAX inside AVG.
C). Similar to A and B, this query improperly nests SUM inside MAX, which is not allowed without a subquery.
D). This query will execute successfully. It filters rows based on the HIRE_DATE using a correct date format (assuming '9' refers to '09' or '1999' due to the NLS_DATE_FORMAT being 'DD-MON-RR'), then groups the remaining rows by DEPT_ID and calculates the sum of SALARY for each department.
E). This query will not execute successfully because it improperly nests MAX inside AVG without a subquery, and it incorrectly attempts to GROUP BY SALARY, which is already being aggregated.
References:
* Oracle Database SQL Language Reference, 12c Release 1 (12.1): "Aggregate Functions"
* Oracle Database SQL Language Reference, 12c Release 1 (12.1): "GROUP BY Clause"
* Oracle Database SQL Language Reference, 12c Release 1 (12.1): "HAVING Clause"


NEW QUESTION # 24
View the Exhibit and examine the structure of the ORDERStable. The ORDER_IDcolumn is the PRIMARY KEY in the ORDERStable.

Evaluate the following CREATE TABLEcommand:
CREATE TABLE new_orders(ord_id, ord_date DEFAULT SYSDATE, cus_id)
AS
SELECT order_id.order_date,customer_id
FROM orders;
Which statement is true regarding the above command?

  • A. The NEW_ODRDERStable would not get created because the column names in the CREATE TABLE command and the SELECTclause do not match.
  • B. The NEW_ODRDERStable would not get created because the DEFAULTvalue cannot be specified in the column definition.
  • C. The NEW_ODRDERStable would get created and only the NOT NULLconstraint defined on the specified columns would be passed to the new table.
  • D. The NEW_ODRDERStable would get created and all the constraints defined on the specified columns in the ORDERStable would be passed to the new table.

Answer: C


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

  • A. All the constraints can be defined at the column level as well as the table level
  • B. A column with the UNIQUE constraint can contain NULL.
  • C. A constraint can be disabled even if the constraint column contains data.
  • D. A constraint is enforced only for the INSERT operation on a table.
  • E. A foreign key cannot contain NULL values.

Answer: B,C


NEW QUESTION # 26
Which three statements are true? (Choose three.)

  • A. The data dictionary is created and maintained by the database administrator.
  • B. The usernames of all users including database administrators are stored in the data dictionary.
  • C. Views with the same name but different prefixes, such as DBA, ALL and USER, reference the same base tables from the data dictionary.
  • D. Data dictionary views consist of joins of dictionary base tables and user-defined tables.
  • E. The USER_CONS_COLUMNS view should be queried to find the names of columns to which constraints apply.
  • F. Both USER_OBJECTS and CAT views provide the same information about all objects that are owned by the user.

Answer: B,C,E

Explanation:
References:
https://docs.oracle.com/cd/B10501_01/server.920/a96524/c05dicti.htm


NEW QUESTION # 27
Examine the description of the EMPLOYEES table:

Which query requires explicit data type conversion?

  • A. SELECT salary + '120.50' FROM employees;
  • B. SELECT join_date FROM employees WHERE join_date > '10-02-2018';
  • C. SELECT join_date + '20' FROM employees;
  • D. SELECT SUBSTR(join_date, 1, 2) - 10 FROM employees;
  • E. SELECT join_date || ' ' || salary FROM employees;

Answer: B

Explanation:
Explanation


NEW QUESTION # 28
View the Exhibit and examine the description of the ORDERS table. (Choose two.) Which two WHERE clause conditions demonstrate the correct usage of conversion functions?

  • A. WHERE Order_date > ( TO_DATE('JUL 10 2006', 'MON DD YYYY')
  • B. WHERE Order_date_IN ( TO_DATE('OCT 21 2003', 'MON DD YYYY'), TO_CHAR('NOV
    21 2003', 'MON DD YYYY') )
  • C. WHERE TO_CHAR(Order_date, 'MON DD YYYY') = 'JAN 20 2003'
  • D. WHERE Order_date > TO_CHAR(ADD_MONTHS(SYSDATE, 6), 'MON DD YYYY')

Answer: A,C


NEW QUESTION # 29
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 = 2000 or
cust_credit_limit = 3000
Which statement is true regarding the above two queries?

  • A. Performance would degrade in query 2.
  • B. Performance would improve in query 2 only if there are null values in the CUST_CREDIT_LIMIT column.
  • C. There would be no change in performance.
  • D. Performance would improve in query 2.

Answer: C

Explanation:
Explanation
References:
http://oraclexpert.com/restricting-and-sorting-data/


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

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

Answer: A,E


NEW QUESTION # 31
Examine this description of the PRODUCTS table:

You successfully execute this command:

Which two statements execute without errors? (Choose two.)

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

Answer: A,B


NEW QUESTION # 32
Evaluate the following SQL statement:
SELECT product_name || 'it's not available for order'
FROM product_information
WHERE product_status = 'obsolete';
You received the following error while executing the above query:
ERROR
ORA-01756: quoted string not properly terminated
What would you do to execute the query successfully?

  • A. Remove the single quotation marks enclosing the character literal string in the SELECT clause
  • B. Use the Oracle (q) operator and delimiter to allow the use of a single quotation mark within the literal character string in the SELECT clause
  • C. Use the escape character to negate the single quotation mark within the literal character string in the SELECT clause
  • D. Enclose the character literal string in the SELECT clause within double quotation marks

Answer: B

Explanation:
Explanation
http://docs.oracle.com/cd/B19306_01/server.102/b14200/sql_elements003.htm


NEW QUESTION # 33
Which two are true about using constraints? (Choose two.)

  • A. A table can have only one PRIMARY KEYand one FOREIGN KEYconstraint.
  • B. A FOREIGN KEY column in a child table and the referenced PRIMARY KEYcolumn in the parent table must have the same names.
  • C. NOT NULLcan be specified at the column and at the table level.
  • D. A table can have multiple PRIMARY KEYand multiple FOREIGN KEYconstraints.
  • E. A table can have only one PRIMARY KEYbut may have multiple FOREIGN KEYconstraints.
  • F. PRIMARY KEYand FOREIGN KEYconstraints can be specified at the column and at the table level.

Answer: C,E

Explanation:
FOREIGN KEY constraint can only point to one table and each table can only have one PRIMARY KEY constraint.
Or you can have multiple FOREIGN KEY constraints on the same column(s) referencing one PRIMARY KEY.
The identified columns must be defined as NOT NULL.
Reference: https://stackoverflow.com/questions/42268886/how-to-have-a-foreign-key-pointing-to-two-primary- keys
https://docs.oracle.com/javadb/10.8.3.0/ref/rrefsqlj13590.html


NEW QUESTION # 34
View the exhibit and examine the ORDERS table.

The ORDERS table contains data and all orders have been assigned a customer ID. Which statement would add a NOT NULL constraint to the CUSTOMER_ID column?

  • A. ALTER TABLE ordersMODIFY customer_id CONSTRAINT orders_cust_nn NOT NULL (customer_id);
  • B. ALTER TABLE ordersADD CONSTRAINT orders_cust_id_nn NOT NULL (customer_id);
  • C. ALTER TABLE ordersADD customer_id NUMBER(6)CONSTRAINT orders_cust_id_nn NOT NULL;
  • D. ALTER TABLE ordersMODIFY CONSTRAINT orders_cust_id_nn NOT NULL (customer_id);

Answer: A


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

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

Answer: B


NEW QUESTION # 36
Which two statements are true about the DUAL table? (Choose two.)

  • A. It can display multiple rows but only a single column.
  • B. It can be accessed by any user who has the SELECT privilege in any schema.
  • C. It can be accessed only by the SYS user.
  • D. It can be used to display only constants or pseudo columns.
  • E. It can display multiple rows and columns.
  • F. It consists of a single row and single column of VARCHAR2data type.

Answer: B,F


NEW QUESTION # 37
Evaluate the following statement.

Which statement is true regarding the evaluation of rows returned by the subquery in the INSERTstatement?

  • A. All rows are evaluated by all the three WHEN clauses.
  • B. The INSERT statement will return an error because the ELSE clause is missing.
  • C. Each row is evaluated by the first WHEN clause and if the condition is true, then the row would be evaluated by the subsequent when clauses.
  • D. Each row is evaluated by the first WHEN clause and if the condition is false then the row would be evaluated by the subsequent when clauses.

Answer: A


NEW QUESTION # 38
View the Exhibit and examine the structure of ORDERSand CUSTOMERStables.

You executed this UPDATEstatement:

Which statement is true regarding the execution? (Choose the best answer.)

  • A. It would not execute because a SELECTstatement cannot be used in place of a table name.
  • B. It would not execute because two tables cannot be referenced in a single UPDATEstatement.
  • C. It would execute and restrict modifications to the columns specified in the SELECTstatement.
  • D. It would not execute because a subquery cannot be used in the WHEREclause of an UPDATEstatement.

Answer: C

Explanation:
Explanation/Reference:


NEW QUESTION # 39
Examine the data in the NEW_EMPLOYEES table:

Examine the data in the EMPLOYEES table:

You want to:
1. Update existing employee details in the EMPLOYEES table with data from the NEW EMPLOYEES table.
2. Add new employee detail from the NEW_ EMPLOYEES able to the EMPLOYEES table.
Which statement will do this:

  • A. MERGE INTO employees e
    USING new employees ne
    ON (e.employee_id = ne.employee_id)
    WHEN FOUND THEN
    UPDATE SET e.name =ne.name, e.job_id=ne.job_id, e.salary =ne.salary
    WHEN NOT FOUND THEN
    INSERT VALUES (ne.employee_id,ne.name,ne.job_id,ne.salary) ;
  • B. MERGE INTO employees e
    USING new_employees n
    ON (e.employee_id = ne.employee_id)
    WHEN MATCHED THEN
    UPDATE SET e.name = ne.name, e.job id = ne.job_id,e.salary =ne. salary
    WHEN NOT MATCHED THEN
    INSERT VALUES (ne. employee_id,ne.name,ne.job_id,ne.salary);
  • C. MERGE INTO employees e
    USING new_employees n
    WHERE e.employee_id = ne.employee_id
    WHEN FOUND THEN
    UPDATE SET e.name=ne.name,e.job_id =ne.job_id, e.salary=ne.salary
    WHEN NOT FOUND THEN
    INSERT VALUES (ne.employee_ id,ne.name,ne.job id,ne.salary) ;
  • D. MERGE INTO employees e
    USING new employees ne
    WHERE e.employee_id = ne.employee_ id
    WHEN MATCHED THEN
    UPDATE SET e.name = ne.name, e.job_id = ne.job_id,e.salary =ne. salary
    WHEN NOT MATCHED THEN
    INSERT VALUES (ne. employee_id,ne.name, ne.job_id,ne.salary) ;

Answer: B


NEW QUESTION # 40
Examine the description of the EMPLOYEEStable:

Examine this query:

Which line produces an error?

  • A. Line 7
  • B. Line 8
  • C. Line 5
  • D. Line 3

Answer: D


NEW QUESTION # 41
View the exhibit and examine the structure of the EMPLOYEEStable.

You want to display all employees and their managers having 100 as the MANAGER_ID. You want the output in two columns: the first column would have the LAST_NAMEof the managers and the second column would have LAST_NAMEof the employees.
Which SQL statement would you execute?

  • A. SELECT m.last_name "Manager", e.last_name "Employee"
    FROM employees m JOIN employees e
    ON e.employee_id = m.manager_id
    WHERE m.manager_id = 100;
  • B. SELECT m.last_name "Manager", e.last_name "Employee"
    FROM employees m JOIN employees e
    ON m.employee_id = e.manager_id
    WHERE m.manager_id = 100;
  • C. SELECT m.last_name "Manager", e.last_name "Employee"
    FROM employees m JOIN employees e
    WHERE m.employee_id = e.manager_id and AND e.manager_id = 100
  • D. SELECT m.last_name "Manager", e.last_name "Employee"
    FROM employees m JOIN employees e
    ON m.employee_id = e.manager_id
    WHERE e.manager_id = 100;

Answer: D


NEW QUESTION # 42
......

REAL 1z0-071 Exam Questions With 100% Refund Guarantee : https://www.itcertmagic.com/Oracle/real-1z0-071-exam-prep-dumps.html

Get Special Discount Offer on 1z0-071 Dumps PDF: https://drive.google.com/open?id=1PH0Dg_uBj7TAs9o81wtXssJCgqC5Fp4f