Labour Day Special - 65% Discount Offer - Ends in 0d 00h 00m 00s - Coupon code: c4sdisc65

1z0-071 PDF

$38.5

$109.99

3 Months Free Update

  • Printable Format
  • Value of Money
  • 100% Pass Assurance
  • Verified Answers
  • Researched by Industry Experts
  • Based on Real Exams Scenarios
  • 100% Real Questions

1z0-071 PDF + Testing Engine

$61.6

$175.99

3 Months Free Update

  • Exam Name: Oracle Database 12c SQL
  • Last Update: May 4, 2024
  • Questions and Answers: 324
  • Free Real Questions Demo
  • Recommended by Industry Experts
  • Best Economical Package
  • Immediate Access

1z0-071 Engine

$46.2

$131.99

3 Months Free Update

  • Best Testing Engine
  • One Click installation
  • Recommended by Teachers
  • Easy to use
  • 3 Modes of Learning
  • State of Art Technology
  • 100% Real Questions included

1z0-071 Practice Exam Questions with Answers Oracle Database 12c SQL Certification

Question # 6

Which three statements are true about GLOBAL TEMPORARY TABLES?

A.

GLOBAL TEMPORARY TABLE rows inserted by a session are available to any other session whose user has been granted select on the table.

B.

A TRUNCATE command issued in a session causes all rows In a GLOBAL TEMPORARY TABLE for the issuing session to be deleted.

C.

A DELETE command on a GLOBAL TEMPORARY TABLE cannot be rolled back.

D.

A GLOBAL TEMPORARY TABLE's definition is available to multiple sessions.

E.

Any GLOBAL TEMPORARY TABLE rows existing at session termination will be deleted.

F.

GLOBAL TEMPORARY TABLE space allocation occurs at session start.

Full Access
Question # 7

Which two statements are true about * _ TABLES views?

A.

You must have SELECT privileges on a table to view it in ALL _TABLES.

B.

You must have SELECT privileges on a table to view it in DBA TABLES.

C.

USER_ TABLES displays all tables owned by the current user.

D.

ALL TABLES displays all tables owned by the current user.

E.

You must have SELECT privileges on a table to view it in USER TABLES.

F.

All users can query DBA TABLES successfully.

Full Access
Question # 8

Which two statements are true about the DUAL table?

A.

It can display multiple rows and columns.

B.

It can be accessed only by the SYS user.

C.

It can be accessed by any user who has the SELECT privilege in any schema

D.

It can display multiple rows but only a single column.

E.

It consists of a single row and single column of VARCHAR2 data type.

F.

It can be used to display only constants or pseudo columns.

Full Access
Question # 9

Examine the description of the BOOKS table:

1z0-071 question answer

The table has 100 rows.

Examine this sequence of statements issued in a new session;

INSERT INTO BOOKS VALUES (‘ADV112’ , ‘Adventures of Tom Sawyer’, NULL, NULL);

SAVEPOINT a;

DELETE from books;

ROLLBACK TO SAVEPOINT a;

ROLLBACK;

Which two statements are true?

A.

The first ROLLBACK command restores the 101 rows that were deleted, leaving the inserted row still to be committed.

B.

The second ROLLBACK command does nothing.

C.

The first ROLLBACK command restores the 101 rows that were deleted and commits the inserted row.

D.

The second ROLLBACK command replays the delete.

E.

The second ROLLBACK command undoes the insert.

Full Access
Question # 10

Which two statements are true about Entity Relationships?

A.

A Relationship can be mandatory for both entities

B.

A one-to-one relationship is always a self-referencing relationship

C.

A many-to-many relationship can be implemented only by using foreign keys

D.

A table name can be specified just once when selecting data from a table having a selfreferencing relationship

E.

A one-to-many relationship in one direction is a one-to-one relationship in the other direction

Full Access
Question # 11

MANAGER is an existing role with no privileges or roles.

EMP is an existing role containing the CREATE TABLE privilege.

EMPLOYEES is an existing table in the HR schema.

Which two commands execute successfully?

A.

GRANT CREATE SEQUENCE TO manager, emp;

B.

GRANT SELECT, INSERT ON hr.employees TO manager WITH GRANT OPTION:

C.

GRANT CREATE TABLE, emp TO manager;

D.

GRANT CREATE TABLE, SELECT ON hr. employees TO manager;

E.

GRANT CREATE ANY SESSION, CREATE ANY TABLE TO manager;

Full Access
Question # 12

Examine this partial command:

CREATE TABLE cust(

cust_id NUMBER(2),

credit_limit NUMBER(10)

ORGANIZATION EXTERNAL

Which two clauses are required for this command to execute successfully?

A.

the ACCESS PARAMETERS clause

B.

the DEFAULT DIRECTORY clause

C.

the access driver TYPE clause

D.

the LOCATION clause

E.

the REJECT LIMIT clause

Full Access
Question # 13

Examine the description of the ORDER_ITEMS table:

1z0-071 question answer

Examine this incomplete query:

SELECT DISTINCT quantity * unit_price total_paid FROM order_items ORDER BY ;

Which two can replace so the query completes successfully?

A.

quantity

B.

quantity, unit_price

C.

total_paid

D.

product_id

E.

quantity * unit_price

Full Access
Question # 14

You and your colleague Andrew have these privileges on the EMPLOYEE_RECORDS table:

1. SELECT

2. INSERT

3. UPDATE

4. DELETE

You connect to the database instance an perform an update to some of the rows in

EMPLOYEE_RECORDS, but don’t commit yet.

Andrew connects to the database instance and queries the table

No othet user are accessing the table

Which two statements ate true at this point?

A.

Andrew will be able to modify any rows in the table that have not been modified by your transaction

B.

Andrew will be unable to see the changes you have made

C.

Andrew will be able to see the changes you habe made

D.

Andrew will be unable to perform any INSERT, UPDATE of DELETE on the teble

E.

Andrew will be able to SELECT from the table, but be unable to modify any existing rows.

Full Access
Question # 15

Examine the description of the EMPLOYEES table:

1z0-071 question answer

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 HAVING hire_date> ' O1-JAN-19';

B.

SELECT dept_ id, AVG(MAX(salary)) FROM employees GROUP BY dept_id, salary;

C.

SELECT dept id, MAX (SUM(salary)) FROM employees GROUP BY dept_id;

D.

SELECT dept_ iD, sum(salary) FROM employees WHERE hire_date > '01-JAN-9' GROUP BY dept_id;

E.

SELECT AVG(MAX(salary)) FROM employees GROUP BY salary;

Full Access
Question # 16

Which three actions can you perform by using the ORACLE DATAPUMP access driver?

A.

Create a directory object for an external table.

B.

Read data from an external table and load it into a table in the database.

C.

Query data from an external table.

D.

Create a directory object for a flat file.

E.

Execute DML statements on an external table.

F.

Read data from a table in the database and insert it into an external table.

Full Access
Question # 17

Which two queries execute successfully?

A.

SELECT INTERVAL '1' DAY - SYSDATE FROM DUAL;

B.

SELECT SYSTIMESTAMP + INTERVAL '1' DAY FROM DUAL;

C.

SELECT INTERVAL '1' DAY - INTERVAL '1' MINUTE FROM DUAL;

D.

select INTERVAL '1' DAY +INTERVAL '1' MONTH FROM DUAL;

E.

SELECT SYSDATE “INTERRVAL '1' DAY FROM DUAL;

Full Access
Question # 18

Which statement executes successfully?

A.

SELECT TO_DATE(TO_NUMBER(INTERVATL '800' SECOND)) FROM DUAL;

B.

SELECT TO_NUMBER(INTERVAL'800' SECOND, 'HH24:MM') FROM DUAL;

C.

SELECT TO_DATE(INTERVAL '800' SECOND,'HH24:MM') FROM DUAL;

D.

SELECT TO_NUWBER(TO_DATE(INTERVAL '800' SECOND)) FROM DUAL;

E.

SELECT TO_CHAR(INTERVAL '800' SECOND, 'HH24:MM') FROM DUAL;

Full Access
Question # 19

Which two statements are true about Oracle synonyms?

A.

A synonym can have a synonym.

B.

A synonym has an object number.

C.

Any user can create a public synonym.

D.

All private synonym names must be unique in the database.

E.

A synonym can be created on an object in a package.

Full Access
Question # 20

Which three statements are true about performing Data Manipulation Language (DML) operations on a view In an Oracle Database?

A.

Insert statements can always be done on a table through a view.

B.

The WITH CHECK clause has no effect when deleting rows from the underlying table through the view.

C.

Views cannot be used to query rows from an underlying table if the table has a PRIPOARY KEY and the PRIMARY KEY columns are not referenced in the defining query of the view.

D.

Views cannot be used to add or modify rows in an underlying table if the defining query of the view contains the DISTINCT keyword.

E.

Views cannot be used to add on modify rows in an underlying table if the defining query of the view contains aggregating functions.

F.

Views cannot be used to add rows to an underlying table if the table has columns with NOT NULL constraints lacking default values which are not referenced in the defining query of the view.

Full Access
Question # 21

Which four statements are true about constraints on Oracle tables?

A.

A Column can have only one CHECK Constraint.

B.

A NOT NULL Constraint can be defined at the table level.

C.

A UNIQUE constraint permits NULLS.

D.

A PRIMARY KEY Constraint can be added after a table has been created and populated.

E.

A CHECK Constraint can refer to values in other rows.

F.

A UNIQUE Constraint can use a pre-existing index on the constrained column or columns.

G.

A FOREIGN KEY Column can contain NULLS.

Full Access
Question # 22

Examine this query which executes successfully;

Select job,deptno from emp

Union all

Select job,deptno from jobs_history;

What will be the result?

A.

It will return rows from both select statements after eliminating duplicate rows.

B.

It will return rows common to both select statements.

C.

It will return rows both select statements including duplicate rows.

D.

It will return rows that are not common to both select statements.

Full Access
Question # 23

Examine this query:

SELECT TRUNC (ROUND(156.00,-2),-1) FROM DUAL; What is the result?

A.

16

B.

160

C.

150

D.

200

E.

100

Full Access
Question # 24

SELECT *

FROM bricks,colors;

Which two statements are true?

A.

You can add an ON clause with a join condition.

B.

You can add a WHERE clause with filtering criteria.

C.

It returns the number of rows in BRICKS plus the number of rows in COLORS.

D.

You can add a USING clause with a join condition.

E.

It returnsthe same rows as SELECT * FROM bricks CROSS JOIN colors.

Full Access
Question # 25

Which three actions can you perform on an existing table containing date?

A.

Add a new column as the table's first column.

B.

Define a default value that is automatically inserted into a column containing nulls.

C.

Add a new NOT NULL Column with a DEFAULT value.

D.

Change a DATE Column containing data to a NUMBER data type.

E.

Increase the width of a numeric column.

F.

Change the default value of a column.

Full Access
Question # 26

Which two are true about queries using set operators such as UNION?

A.

An expression in the first SELECT list must have a column alias for the expression

B.

CHAR columns of different lengths used with a set operator retum a vAacsua mhtoe e equals the longest CHAR value.

C.

Queries using set operators do not perform implicit conversion across data type groups (e.g. character, numeric)

D.

In a query containing multiple set operators INTERSECT always takes precedence over UNION and UNION ALL

E.

All set operators are valid on columns all data types.

Full Access
Question # 27

Which three are true about subqueries?

A.

A subquery can be used in a WHERE clause.

B.

A subquery can be used in a HAVING clause.

C.

=ANY can only evaluate the argument against a subcjuery if it returns two or more values.

D.

E.

A subquery cannot be used in a FROM clause.

F.

< any returns true if the argument is less than the lowest value returned by the subquery.

G.

A subquery cannot be used in the select list.

Full Access
Question # 28

Examine the description of the EMPLOYEES table:

1z0-071 question answer

Which two queries return rows for employees whose manager works in a different department?

A.

SELECT emp. *

FROM employees emp

WHERE manager_ id NOT IN (

SELECT mgr.employee_ id

FROM employees mgr

WHERE emp. department_ id < > mgr.department_ id

);

B.

SELECT emp.*

FROM employees emp

WHERE NOT EXISTS (

SELECT NULL

FROM employees mgr

WHERE emp.manager id = mgr.employee_ id

AND emp.department_id<>mgr.department_id

);

C.

SELECT emp.*

FROM employees emp

LEFT JOIN employees mgr

ON emp.manager_ id = mgr.employee_ id

AND emp. department id < > mgr. department_ id;

D.

SELECT emp. *

FROM employees emp

RIGHT JOIN employees mgr

ON emp.manager_ id = mgr. employee id

AND emp. department id <> mgr.department_ id

WHERE emp. employee_ id IS NOT NULL;

E.

SELECT emp. *

FROM employees emp

JOIN employees mgr

ON emp. manager_ id = mgr. employee_ id

AND emp. department_ id<> mgr.department_ id;

Full Access
Question # 29

The STORES table has a column START_ DATE of data type DATE, containing the date the row was inserted.

You only want to display details of rows where START_ DATE is within the last 25 months.

Which WHERE clause can be used?

A.

WHERE MONTHS_ BETWEEN (SYSDATE, start_ date) <= 25

B.

WHERE MONTHS_ BETWEEN (start_ date, SYSDATE) <= 25

C.

WHERE TO_ NUMBER (start_ date - SYSDATE) <= 25

D.

WHERE ADD_ MONTHS (start_ date, 25) <= SYSDATE

Full Access
Question # 30

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:

1z0-071 question answer

Which two statements are true?

A.

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.

B.

PROJECT_ID must be the primary key in the PROJECTS entity and foreign key in the STUDENTS entity.

C.

The ER must have a 1-to-many relationship between the STUDENTS and PROJECTS entities.

D.

The ER must have a many to-many relationship between the STUDENTS and PROJECTS entities that must be resolved into 1-to-many relationships.

E.

STUDENT ID must be the primary key in the STUDENTS entity and foreign key in the PROJECTS entity.

Full Access
Question # 31

Which two statements will return the names of the three employees with the lowest salaries?

A.

SELECT last_name, salary

FROM employees

WHERE ROWNUM<=3

B.

SELECT last_name,salary

FROM employees

ORDER BY salary

FETCH FIRST 3 ROWS ONLY;

C.

SELECT last_name,salary

FROM employees

WHERE ROWNUM<=3

ORDER BY (SELECT salary FROM employees);

D.

SELECT last_name,salary

FROM (SELECT * FROM employees ORDER BY salary)

E.

SELECT last_name,salary

FROM employees

FETCH FIRST 3 ROWS ONLY

ORDER BY salary;

Full Access
Question # 32

Which three statements are true about the DESCRIBE command?

A.

It can be used from SQL Developer.

B.

It can be used to display the structure of an existing view.

C.

It can be used only from SQL*Plus.

D.

It displays the NOT NULL constraint for any columns that have that constraint.

E.

It displays all constraints that are defined for each column.

F.

It displays the PRIMARY KEY constraint for any column or columns that have that constraint.

Full Access
Question # 33

Which three are true about system and object privileges

A.

WITH GRANT OPTION can be used when granting an object privilege to both users and roles

B.

WITH GRANT OPTION cannot be used when granting an object privilege to PUBLIC

C.

Revoking a system privilege that was granted with the WITH ADMIN OPTION has a cascading effect.

D.

Revoking an object privilege that was granted with the WITH GRANT OPTION clause has a cascading effect

E.

Adding a primary key constraint to an existing table in another schema requires a system privilege

F.

Adding a foreign key constraint pointing to a table in another schema requires the REFERENCEs object privilege

Full Access
Question # 34

You need to calculate the number of days from 1st January 2019 until today.

Dates are stored in the default format of DD-MON-RR.

Which two queries give the required output?

A.

SELECT SYSDATE-TO_DATE ('01-JANUARY-2019') FROM DUAL;

B.

SELECT TO_DATE (SYSDATE, 'DD/MONTH/YYYY')-'01/JANUARY/2019' FROM DUAL;

C.

SELECT ROUND (SYSDATE-TO_DATE ('01/JANUARY/2019')) FROM DUAL;

D.

SELECT TO_CHAR (SYSDATE, 'DD-MON-YYYY')-'01-JAN-2019' FROM DUAL;

E.

SELECT ROUND (SYSDATE- '01-JAN-2019') FROM DUAL:

Full Access
Question # 35

Which two are true about transactions in the Oracle Database?

A.

A session can see uncommitted updates made by the same user in a different session.

B.

A DDL statement issued by a session with an uncommitted transaction automatically Commits that transaction.

C.

DML statements always start new transactions.

D.

DDL statements automatically commit only data dictionary updates caused by executing the DDL.

E.

An uncommitted transaction is automatically committed when the user exits SQL*Plus.

Full Access
Question # 36

You execute this command:

TRUNCATE TABLE dept;

Which two are true?

A.

It drops any triggers defined on the table.

B.

It retains the indexes defined on the table.

C.

It retains the integrity constraints defined on the table.

D.

A ROLLBACK statement can be used to retrieve the deleted data.

E.

It always retains the space used by the removed rows.

F.

A FLASHBACK TABLE statement can be used to retrieve the deleted data.

Full Access
Question # 37

Examine this description of the PRODUCTS table:

You successfully execute this command:

CREATE TALE new_prices(prod_id NUBER(2),price NUMBER(8,2));

Which two statements execute without errors?

A.

MERGE INTO new_prices n

USING(SELECT*FROM products)p

WHEN MATECHED THEN

UPDATE SET n.price=p.cost*.01

WHEN NOT MATCHED THEN

INSERT(n.prod_id,n.price)VALUES (p.prod_id,cost*01)

WHERE(p.cost<200);

B.

MERGE INTO new_prices n

USING(SELECT*FROM product WHERE cost>150) p

ON (n.prod_id=p.prod_id)

WHEN NATCHED THEN

DELETE WHERE(p.cost<200)

WHEN NOT MATCHED THEN

INSERT (n.prod_id,n.price)VALUES (p.prod_id,p.cost*.01);

C.

MERGE INTO new_prices n

USING (SELECT * FROM products WHERE cost>150) p

ON (n.prod_id=p.prod_id)

WHEN NATCHED THEN

UPDATE SET n.price=p.cost*.01

DELETE WHERE (p.cost<200);

D.

MERGE INTO new_prices n

USING products p

WHEN NOT NATCHED THEN

INSERT (n.prod_id, n.price)VALUES (p.prod_id,cost*.01)

WHERE (p.cost <200);

Full Access
Question # 38

Examine the description products table:

1z0-071 question answer

Examine the description of the new_projects table;

1z0-071 question answer

Which two queries execute successfully?

A)

1z0-071 question answer

B)

1z0-071 question answer

C)

1z0-071 question answer

D)

1z0-071 question answer

E)

1z0-071 question answer

A.

Option A

B.

Option B

C.

Option C

D.

Option D

E.

Option E

Full Access
Question # 39

Examine the description of the SALES table:

1z0-071 question answer

The SALES table has 5,000 rows.

Examine this statement:

CREATE TABLE sales1 (prod id, cust_id, quantity_sold, price)

AS

SELECT product_id, customer_id, quantity_sold, price

FROM sales

WHERE 1=1

Which two statements are true?

A.

SALES1 is created with 1 row.

B.

SALES1 has PRIMARY KEY and UNIQUE constraints on any selected columns which had those constraints in the SALES table.

C.

SALES1 Is created with 5,000 rows.

D.

SALES1 has NOT NULL constraints on any selected columns which had those constraints in the SALES table.

Full Access
Question # 40

Which two statements are true about the ORDER BY clause?

A.

Numeric values are displayed in descending order if they have decimal positions.

B.

Only columns that are specified in the SELECT list can be used in the ORDER BY cause.

C.

NULLS are not included in the sort operation.

D.

Column aliases can be used In the ORDER BY cause.

E.

Ina character sort, the values are case-sensitive.

Full Access
Question # 41

Which two statements are true about INTERVAL data types

A.

INTERVAL YEAR TO MONTH columns only support monthly intervals within a range of years.

B.

The value in an INTERVAL DAY TO SECOND column can be copied into an INTERVAL YEAR TO MONTH column.

C.

INTERVAL YEAR TO MONTH columns only support monthly intervals within a single year.

D.

The YEAR field in an INTERVAL YEAR TO MONTH column must be a positive value.

E.

INTERVAL DAY TO SECOND columns support fractions of seconds.

F.

INTERVAL YEAR TO MONTH columns support yearly intervals.

Full Access
Question # 42

Which two statements are true about the data dictionary?

A.

Views with the prefix dba_ display only metadata for objects in the SYS schema.

B.

Views with the prefix all_ display metadata for objects to which the current user has access.

C.

The data dictionary is accessible when the database is closed.

D.

Views with the prefix all_, dba_ and useb_ are not all available for every type of metadata.

E.

The data dictionary does not store metadata in tables.

Full Access
Question # 43

Examine this business rule:

Each student can work on multiple projects and earth project can have multiple students.

You must decide an Entity Relationship (ER) model for optional data storage and allow generating reports in this format:

STUDENT_ID FIRST_NAME LAST_NAME PROJECT_ID PROJECT_NAME PROJECT_TASK Which two statements are true?

A.

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.

B.

The ER must have a many-to-many relationship between the STUDENTS and PROJECTS entities that must be resolved into 1-to-many relationships.

C.

PROJECT_ID must be the primary key in the PROJECTS entity and foreign key in the STUDENTS entity.

D.

The ER must have a 1-to-many relationship between the STUDENTS and PROJECTS entities.

E.

STUDENT_ID must be the primary key in the STUDENTS entity and foreign key in the PROJECTS entity.

Full Access
Question # 44

Examine the data in the EMPLOYEES table:

1z0-071 question answer

Which statement will compute the total annual compensation for each employee?

A.

SELECT last name,

(monthly salary*12) + (monthly_commission_pct * 12) AS

annual comp

FROM employees

;

B.

SELECT last_ name (monthly_ salary+ monthly_ commission _ pct) *12 AS annual_

FROM employees ;

C.

SELECT last name, (monthly_ salary *12) + (monthly_ salary * 12 * NVL

(monthly commission pct,0) ) As annual _ comp

FROM employees;

D.

SELECT last_ name, monthly_ salary*12) + (monthly_ salary * 12 * Monthly commission _Pct) AS

annual_ comp

FROM employees;

Full Access
Question # 45

Examine these two queries and their output:

SELECT deptno, dname FROM dept;

1z0-071 question answer

SELECT ename, job, deptno FROM emp ORDER BY deptno;

1z0-071 question answer

Now examine this query:

SELECT ename, dname

FROM emp CROSS JOIN dept WHERE job = 'MANAGER'

AND dept.deptno IN (10, 20) ;

A.

64

B.

6

C.

3

D.

12

Full Access
Question # 46

Examine the data in the ORDERS table:

1z0-071 question answer

Examine the data in the INVOICES table:

1z0-071 question answer

Examine this query:

SELECT order_ id, order_ date FROM orders

INTERSECT

SELECT order_ 1d, order_ date FROM invoices;

Which two rows will it return?

A.

3

B.

2

C.

1

D.

5 01-MAR-2019

E.

4 01-FEB-2019

F.

3 01-JAN-2019

Full Access
Question # 47

Which two statements are true about substitution variables?

A.

A substitution variable used to prompt for a column name must be endorsed in single quotation marks.

B.

A substitution variable used to prompt for a column name must be endorsed in double quotation marks.

C.

A substitution variable prefixed with & always prompts only once for a value in a session.

D.

A substitution variable can be used with any clause in a SELECT statement.

E.

A substitution variable can be used only in a SELECT statement.

F.

A substitution variable prefixed with 6 prompts only once for a value in a session unless is set to undefined in the session.

Full Access
Question # 48

What is true about non-equijoin statement performance?

A.

The between condition always performs less well than using the >= and <= conditions.

B.

The Oracle join syntax performs better than the SQL: 1999 compliant ANSI join syntax.

C.

The join syntax used makes no difference to performance.

D.

The between condition always performs better than using the >= and <= conditions.

E.

Table aliases can improve performance.

Full Access
Question # 49

Which three statements about roles are true?

A.

Roles are assigned to roles using the ALTER ROLE Statement

B.

A role is a named group of related privileges that can only be assigned to a user

C.

Roles are assigned to users using the ALTER USER statement

D.

A single role can be assigned to multiple users.

E.

A single user can be assigned multiple roles

F.

Privileges are assigned to a role using the ALTER ROLE statement.

G.

Privileges are assigned to a role using the GRANT statement.

Full Access
Question # 50

Examine this partial statement:

SELECT ename, sal,comm FROM emp

Now examine this output:

1z0-071 question answer

WHICH ORDER BY clause will generate the displayed output?

A.

ORDER BY NVL(enam,0) DESC, ename

B.

ORDER BY NVL(comm,0) ASC NULLS FIRST, ename

C.

ORDER BY NVL(comm,0) ASC NULLS LAST, ename

D.

ORDER BY comm DESC NULLS LAST, ename

Full Access
Question # 51

View the Exhibits and examine the structure of the COSTS and PROMOTIONS tables.

You want to display PROD IDS whose promotion cost is less than the highest cost PROD ID in a pro

motion time interval.

Examine this SQL statement:

SELECT prod id

FROM costs

WHERE promo id IN

(SELECT promo id

FROM promotions

WHERE promo_cost < ALL

(SELECT MAX (promo cost)

FROM promotions

GROUP BY (promo_end date-promo_begin_date)) );

What will be the result?

A.

It executes successfully but does not give the required result.

B.

It gives an error because the ALL keyword is not valid.

C.

It gives an error because the GROUP BY clause is not valid

D.

It executes successfully and gives the required result.

Full Access
Question # 52

Which two are true about creating tables in an Oracle database?

A.

A create table statement can specify the maximum number of rows the table will contain.

B.

The same table name can be used for tables in different schemas.

C.

A system privilege is required.

D.

Creating an external table will automatically create a file using the specified directory and file name.

E.

A primary key constraint is manadatory.

Full Access
Question # 53

Examine the description of the PRODCTS table which contains data:

1z0-071 question answer

Which two are true?

A.

The PROD ID column can be renamed.

B.

The PROD_ ID column data type can be changed to VARCHAR2 (2).

C.

The EXPIRY DATE column data type can be changed to TIME STAMP.

D.

The EXPIRY DATE column cannot be dropped.

E.

The PROD NAME column cannot have a DEFAULT clause added to it.

Full Access
Question # 54

Which two are true about rollbacks?

A.

The ROLLBACK statement does not release locks resulting from table updates.

B.

Data Control L anguage (DCL) statements, such as GRANT and REVOKE, can be rolled back.

C.

A transaction interrupted by a system failure is automatically rolled back.

D.

If the ROLLBACK statement is used without TO SAVEPOINT, then all savepoints in the transaction are deleted .

E.

Data consistency is not guaranteed after a rollback.

Full Access
Question # 55

Which three statements are true about a self join?

A.

It must be an inner join.

B.

It must be an equijoin.

C.

The query must use two different aliases for the table.

D.

The on clause can be used.

E.

The on clause must be used.

F.

It can be an outer join.

Full Access
Question # 56

Examine the description of the EMPLOYEES table:

1z0-071 question answer

Which statement increases each employee's SALARY by the minimum SALARY for their DEPARTM

ENT_ID?

A.

UPDATE employees e1

SET salary =(SELECT e2. salary + MIN(e2.salary)

FROM employees e2

WHERE e1.department_ id = e2. department_id GROUP BY e2. department_id) ;

B.

UPDATE employees e1

SET salary = salary +

(SELECT MIN(e1. salary)

FROM employees e2

WHERE e1.department_id = e2 .department_id);

C.

UPDATE employees e1

SET salary = salary+(SELECT MIN (salary)

FROM employees e2) ;

D.

UPDATE employees e1

SET salary=

(SELECT e1.salary + MIN(e2.salary)

FROM employees e2

WHERE e1. department_ id = e2.department_id);

Full Access
Question # 57

Which two are true about scalar subquery expressions?

A.

You cannot correlate them with a table in the parent statement

B.

You can use them as a default value for a column.

C.

.You must enclose them in parentheses.

D.

They can return at most one row.

E.

They can return two columns.

Full Access
Question # 58

Which three statements are true about a self join?

A.

It must be an inner join.

B.

It can be an outer join.

C.

The ON clause must be used.

D.

It must be an equijoin.

E.

The query must use two different aliases for the table.

F.

The ON clause can be used.

Full Access
Question # 59

Which two statements are true about views?

A.

Views can be indexed.

B.

Theethi CHEcK clause prevents certalin rows from being updated or inserted in the underying table through the view.

C.

Tables in the defining query of a view must always exist in order to create the view.

D.

Views can be updated without the need to re-grant privileges on the view.

E.

The wITH CHECK clause prevents certain rows from being displayed when querying the view.

Full Access
Question # 60

Which three statements are true regarding single row subqueries?

A.

They must be placed on the left side of the comparison operator or condition.

B.

They must return a row to prevent errors in the SQL statement.

C.

A SQL statement may have multiple single row subquery blocks.

D.

They can be used in the HAVING clause.

E.

They must be placed on the right side of the comparison operator or condition.

F.

They can be used in the clause.

Full Access
Question # 61

Examine this incomplete query:

SELECT DATA’2019-01-01’+

FROM DUAL;

Which three clauses can replaceti add 22 hours to the date?

A.

INTERVAL ‘12:00’

B.

INTERVAL’0,5’DAY

C.

INTERVAL’12’ HOUR

D.

INTERVAL’720’MINUTE

E.

INTERVAL’0 12’DAY TO HOUR

F.

INTERVAL’11:60’HOUR TO MINUTE

Full Access
Question # 62

Evaluate the following SQL statement

SQL>SELECT promo_id, prom _category FROM promotions

WHERE promo_category=’Internet’ ORDER BY promo_id

UNION

SELECT promo_id, promo_category FROM Pomotions

WHERE promo_category = ‘TV’

UNION

SELECT promoid, promocategory FROM promotions WHERE promo category=’Radio’

Which statement is true regarding the outcome of the above query?

A.

It executes successfully and displays rows in the descend ignore of PROMO CATEGORY.

B.

It produces an error because positional, notation cannot be used in the ORDER BY clause with SBT operators.

C.

It executes successfully but ignores the ORDER BY clause because it is not located at the end of the compound statement.

D.

It produces an error because the ORDER BY clause should appear only at the end of a compound query-that is, with the last SELECT statement.

Full Access
Question # 63

which is true about the round,truncate and mod functions>?

A.

ROUND(MOD(25,3),-1) IS INVALID

B.

ROUND(MOD(25,3),-1) AND TRUNC(MOD(25,3),-1) ARE BOTH VALID AND GIVE THE SAME RESULT.

C.

ROUND(MOD(25,3),-1) AND TRUNC(MOD(25,3),-1) ARE BOTH VALID AND GIVE THE DIFFERENT RESULTS.

D.

TRUNC(MOD(25,3),-1) IS INVALID.

Full Access
Question # 64

Examine the description of the EMPLOYEES table:

1z0-071 question answer

Which statement will fail?

A.

SELECT department_id, COUNT (*)

FROM employees

HAVING department_ id <> 90 AND COUNT(*) >= 3

GROUP BY department_id;

B.

SELECT department_id, COUNT (*)

FROM employees

WHERE department_ id <> 90 AND COUNT(*) >= 3

GROUP BY department_id;

C.

SELECT department_id, COUNT(*)

FROM employees

WHERE department_id <> 90 HAVING COUNT(*) >= 3

GROUP BY department_id;

D.

SELECT department_id, COUNT(*)

FROM employees

WHERE department_id <> 90 GROUP BY department_id

HAVING COUNT(*) >= 3;

Full Access
Question # 65

Examine these statements:

CREATE TABLE dept (

deptno NUMBER PRIMARY KEY,

diname VARCHAR2(10) ,

mgr NUMBER ,

CONSTRAINT dept_fkey FOREIGN KEY(mgr) REFERENCES emp (empno));

CREATE TABLE emp (

Empno NUMBER PRIMARY KEY,

Ename VARCHAR2 (10) ,

deptno NUMBER,

CONSTRAINT emp_fkey FOREIGN KEY (deptno) REFERENCES dept (deptno) DISABLE);

ALTER TABLE emp MODIFY CONSTRAINT emp_fkey ENABLE;

Which two are true?

A.

The MGR column in the DEPT table will not be able to contain NULL values.

B.

The CREATE TABLE EMP statement must precede the CREATE TABLE DEPT statement for all threestatements to execute successfully.

C.

Both foreign key constraint definitions must be removed from the CREATE TABLE statements, andbe added with ALTER TABLE statements once both tables are created, for the two CREATE TABLEstatements to

execute successfully in the order shown.

D.

The DEFT FKEY constraint definition must be removed from the CREATE TABLE DEF statement.and be added with an AITER TABLE statement once both tables are created, for the two CREATE TABLE statements

to execute successfully in the order shown.

E.

The Deptno column in the emp table will be able to contain nulls values.

F.

All three statements execute successfully in the order shown

Full Access
Question # 66

Which statement is true about TRUNCATE and DELETE?

A.

For large tables TRUNCATE is faster than DELETE.

B.

For tables with multiple indexes and triggers is faster than TRUNCATE.

C.

You can never TRUNCATE a table if foreign key constraints will be violated.

D.

You can never tows from a table if foreign key constraints will be violated.

Full Access
Question # 67

Examine this list of queries:

Which two statements are true?

A.

1 and 4 give the same result.

B.

2 returns the value 20.

C.

2 and 3 give the same result.

D.

3 returns an error.

E.

1 and 4 give different results.

Full Access
Question # 68

Examine this SQL statement:

1z0-071 question answer

Which two are true?

A.

The subquery is executed before the UPDATE statement is executed.

B.

All existing rows in the ORDERS table are updated.

C.

The subquery is executed for every updated row in the ORDERS table.

D.

The UPDATE statement executes successfully even if the subquery selects multiple rows.

E.

The subquery is not a correlated subquery.

Full Access
Question # 69

Examine the description of the MEMBERS table;

SELECT city,last_name LNAME FROM members …

You want to display all cities that contain the string AN. The cities must be returned in ascending order, with the last names further sorted in descending order.

Which two clauses must you add to the query?

A.

ORDER BY 1,2.

B.

ORDER BY last_name DESC,city ASC

C.

CORADER BY 1, LNAME DESC

D.

WHERE city=’%AN%;

E.

WHERE city LIKE ’%AN%;

F.

WHERE city IN (’%AN%’)

Full Access
Question # 70

Which two are true about constraints?

A.

Constraints are enforced only during INSERT operations.

B.

A column with a foreign key constraint can never contain a null value.

C.

All constraints can be defined at the table or column level.

D.

A constraint can be disabled even if the constrained column contains data.

E.

A column with a UNIQUE constraint can contain a NULL value.

Full Access
Question # 71

The PROD_ID column is the foreign key in the SALES table.Which references the PRODUCTS table.

Similarly,the CUST_ID and TIME_ID columns are Also foreign keys in the SALES table referencing the CUSTOMERS and TIMES tables, respectively.

Evaluate the following CREATE TABLE command:

CREATE TABLE new_sales(prod_id, I cust_id, order_date DEFAULT SYSDATE)

AS SELECT I prod_id,cust_id,time_id FROM sales.

Which statement is true regarding the above command?

A.

The NEW_SALES table would not get created because the DEFAULT value cannot be specified in the column definition.

B.

The NEW_SALES table would get created and all the NOT NULL constraints defined on the specified columns would be passed to the new table.

C.

The NEW_SALES table would not get created because the column names in the CREATE TABLE command and the SELECT clause I do not match.

D.

The NEW_SALES table would get created and all the FOREIGN KEY constraints defined on the specified columns would be passed to the new table

Full Access
Question # 72

You issued this command: DROP TABLE hr. employees;

Which three statements are true?

A.

ALL constraints defined on HR, EMPLOYEES are dropped.

B.

The HR. EMPLOYEES table may be moved to the recycle bin.

C.

Synonyms for HR EMPLOYEES are dropped.

D.

Sequences used to populate columns in the HR. EMPLOYEES table are dropped.

E.

All indexes defined on HR, EMPLOYEES are dropped.

F.

Views referencing HR, EMPLOYEES are dropped.

Full Access
Question # 73

Which two are true about using constraints?

A.

A FOREIGN KEY column in a child table and the referenced PRIMARY KEY column in the parenttable must have the same names.

B.

A table can have multiple PRIMARY KEY and multiple FOREIGN KEY constraints.

C.

A table can have only one PRIMARY KEY and one FOREIGN KEY constraint.

D.

PRIMARY KEY and FOREIGNY constraints can be specified at the column and at the table level

E.

A table can have only one PRIMARY KEY but may have multiple FOREIGN KEY constraints.

F.

NOT NULL can be specified at the column and at the table level.

Full Access
Question # 74

The ORDERS table has a column ORDER_DATE of date type DATE The default display format for a date is DD-MON-RR

Which two WHERE conditions demonstrate the correct usage of conversion functions?

A.

WHERE ordet_date> TO_CHAR(ADD_MONTHS(SYSDATE, 6),'MON DD YYYY')

B.

WHERE TO_CHAR(order_date,'MON DD YYYY') ='JAN 20 2019';

C.

WHERE order_date> TO_DATE('JUL 10 2018','MON DD YYYY');

D.

WHERE order_date IN (TO_DATE ('Oct 21 2018','MON DD YYYY'), TO_CHAR('Nov 21 2018','MON DD YYYY'));

E.

WHERE order_date> TO_DATE(ADD_MONTHS(SYSDATE,6),'MON DD YYYY');

Full Access
Question # 75

Which two are true about transactions in the Oracle Database?

A.

DDL statements automatically commit only data dictionary updates caused by executing the DDL.

B.

A DDL statement issued by a session with an uncommitted transation automaticall commits that transaction.

C.

An uncommitted transaction is automatically committed when the user exits SQL*PLUS

D.

DML statements always start new transactions.

E.

A session can see uncommitted updates made by the same user in a different session

Full Access
Question # 76

Which statements are true regarding primary and foreign key constraints and the effect they can have on table data?

A.

A table can have only one primary key but multiple foreign keys.

B.

It is possible for child rows that have a foreign key to remain in the child table at the time the parent row is deleted.

C.

Primary key and foreign key constraints can be defined at both the column and table level.

D.

Only the primary key can be defined the column and table level.

E.

It is possible for child rows that have a foreign key to be deleted automatically from the child table at the time the parent row is deleted.

F.

The foreign key columns and parent table primary key columns must have the same names.

G.

A table can have only one primary key and one foreign key.

Full Access
Question # 77

Which three statements are true about performing DML operations on a view with no Instead of triggers defined?

A.

WITH CHECK clause has no effect when deleting rows from the underlying table through the view.

B.

Insert statements can always be done on a table through a view.

C.

Views cannot be used to add rows to an underlying table if the table has columns with NOT NULL constraints lacking default values which are not referenced in the defining query of the view.

D.

Views cannot be used to add or modify rows in an underlying table if the defining query of the view contains the DISTINCT keyword.

E.

Delete statements can always be done on a table tough a view.

F.

Views cannot be used to query rows from an underlying table if the table has a PRIMARY KEY and the PRIMARY KEY columns are not referenced in the defining query of the view.

Full Access
Question # 78

Examine this query:

SELECT employee_id, first_name, salary

FROM employees

WHERE hiredate > 61*

Which two methods should yours to prevent prompting for hire date value when this queries executed?

A.

Execute the SET VERIFY ON command before executing the query.

B.

Execute the SET VERIFY OFF command before executing the query.

C.

Store the query in a script and pass the substitution value to the script when executing it.

D.

Replace 's1' with &1'in the query:

E.

Use the UNDEFINE command before executing the query.

F.

Use the DEFINE command before executing the query

Full Access
Question # 79

In your session NLS_ DATE_ FORMAT is set to DD–MON_RR.

Which two queries display the year as four digits?

A.

SELECT TO_DATE(TO_CHAR(SYSDATE,'MM/DD/YYYY'),'MM/DD/YYYY') FROM DUAL;

B.

SELECT TO_CHAR (ADD_MONTHS (SYSDATE,6)) FROM DUAL;

C.

SELECT TO_DATE (SYSDATE, 'RRRR-MM-DD') FROM DUAL;

D.

SELECT TO_DATE (ADD_MONTHS(SYSDATE,6), 'dd-mon-yyyy') FROM DUAL;

E.

SELECT TO_CHAR (SYSDATE, 'MM/DD/YYYY') FROM DUAL;

F.

SELECT TO_CHAR (ADD_MONTHS (SYSDATE, 6), 'dd-mon-yyyy') FROM DUAL;

Full Access
Question # 80

Examine this query:

SELECT SUBSTR (SYSDATE,1,5) ‘Result’ FROM DUAL

Which statement is true?

A.

It fails unless the expression is modified to TO-CHAR(SUNBSTR(SYSDATE,1,5)

B.

It fails unless the expression is modified to SUBSTR (TO_ CHAR(SYSDATE),1,5)

C.

It fails unless the expression is modified to SUBSTR (TO_ CHAR(TRUNC(SYSDATE)),1,5)

D.

It executes successfully with an implicit data type conversion

Full Access
Question # 81

In the PROMOTIONS table, the PROMO_ BEGIN_DATE column is of data type and the default date format is DD-MON-RR

Which two statements are true about expressions using PROMO_ BEGIN_DATE in a query?

A.

TONUMBER (PROMO BEGIN_DATE) - 5 will return a number

B.

PROMO_ BEGIN_DATE - 5 will return a date

C.

PROMO_ BEGIN_DATE - SYSDATE will return a number

D.

PROMO_ BEGIN_DATE - SYSDATE will return an error

E.

TODATE(PROMO BEGIN_DATE *5) will return a date

Full Access
Question # 82

Which three are true about multiple INSERT statements?

A.

They can be performed only by using a subquery.

B.

They can be performed on relational tables.

C.

They can be performed on views.

D.

They can be performed on remote tables.

E.

They can be performed on external tables using SQL*Loader.

F.

They can insert each computed row into more than one table.

Full Access
Question # 83

The CUSTOMERS table has a CUST_LAST_NAME column of data type VARCHAR2.

The table has two rows whose COST_LAST_MANE values are Anderson and Ausson.

Which query produces output for CUST_LAST_SAME containing Oder for the first row and Aus for the second?

A.

SELECT REPLACE (REPLACE(cust_last_name,'son',''),'An','O') FROM customers;

B.

SELECT REPLACE (TRIM(TRALING'son' FROM cust_last_name),'An','O') FROM customers;

C.

SELECT INITCAP (REPLACE(TRIM('son' FROM cust_last_name),'An','O')) FROM customers;

D.

SELECT REPLACE (SUBSTR(cust_last_name,-3),'An','O') FROM customers;

Full Access
Question # 84

Examine the contents of the EMP table:

1z0-071 question answer

Examine this query that executes successfully:

1z0-071 question answer

What is the result?

A.

It will return the six employees earning the highest salaries, in descending order.

B.

It will return the five employees earning the highest salaries, in descending order.

C.

It will return the five employees earning the lowest salaries, in ascending order.

D.

It will return the six employees earning the lowest salaries, in ascending order.

Full Access
Question # 85

Examine these SQL statements which execute successfully:

1z0-071 question answer

Which two statements are true after execution?

A.

The primary key constraint will be enabled and DEFERRED.

B.

The primary key constraint will be enabled and IMMEDIATE.

C.

The foreign key constraint will be disabled.

D.

The foreign key constraint will be enabled and DEFERRED.

E.

The foreign key constraint will be enabled and IMMEDIATE.

Full Access
Question # 86

Which two statements are true about transactions in the Oracle Database server?

A.

An uncommitted transaction commits automatically if the user exits SQL*Plus

B.

Data Manipulation Language (DML) statements always start a new transaction.

C.

A user can always see uncommitted updates made by the same user in a different session.

D.

A Data Definition Language (DDL) statement does a commit automatically only for the data dictionary updates caused by the DDL

E.

A session can always see uncommitted updates made by itself.

F.

If a session has an uncommitted transaction, then a DDL statement issue a COMMIT before starting a new transaction.

Full Access
Question # 87

Which two statements are true about the results of using the INTERSECT operator in compound queries?

A.

Reversing the order of the intersected tables can sometimes affect the output.

B.

Column names in each SELECT in the compound query can be different.

C.

INTERSECT returns rows common to both sides of the compound query.

D.

The number of columns in each SELECT in the compound query can be different.

E.

INTERSECT ignores NULLs

Full Access