Spring Sale Special Limited Time 70% Discount Offer - Ends in 0d 00h 00m 00s - Coupon code: buysanta

Exact2Pass Menu

Oracle Database 12c SQL

Last Update 8 hours ago Total Questions : 326

The Oracle Database 12c SQL content is now fully updated, with all current exam questions added 8 hours ago. Deciding to include 1z0-071 practice exam questions in your study plan goes far beyond basic test preparation.

You'll find that our 1z0-071 exam questions frequently feature detailed scenarios and practical problem-solving exercises that directly mirror industry challenges. Engaging with these 1z0-071 sample sets allows you to effectively manage your time and pace yourself, giving you the ability to finish any Oracle Database 12c SQL practice test comfortably within the allotted time.

Question # 11

Table HR.EMPLOYEES contains a row where the EMPLOYEES _ID is 109.

User ALICE has no privileges to access HR.EMPLOYEES.

User ALICE starts a session.

User HR. starts a session and successfully executes these statements:

GRANT DELETE ON employees TO alice;

UPDATE employees SET salary = 24000 WHERE employee_id = 109;

In her existing session ALICE then executes:

DELETE FROM hr.employees WHERE employee_id = 109;

What is the result?

A.

The DELETE command will immediately delete the row.

B.

The DELETE command will wait for HR ' s transaction to end then delete the row.

C.

The delete command will wait for HR ' s transaction to end then return an error.

D.

The delete command will immediately return an error.

Question # 12

Evaluate these commands which execute successfully CREATE SEQUENCE ord_seq

INCREMENT BY 1

START WITH 1

MAXVALUE 100000

CYCLE

CACHE 5000;

Create table ord_items(

ord_no number(4) default ord_seq.nextval not null,

Item_no number(3),

Qty number(3),

Expiry_date date,

Constraint it_pk primary key(ord_no,item_no),

Constraint ord_fk foreign key (ord_no) references orders(ord_no));

Which two statements are true about the ORD_ITEMS table and the ORD_SEQ sequence?

A.

Any user inserting rows into table ORD_ITEMS must have been granted access to sequence ORD_SEQ.

B.

Column ORD_NO gets the next number from sequence ORD_SEQ whenever a row is inserted into ORD_ITEMS and no explicit value is given for ORD_NO.

C.

Sequence ORD_SEQ cycles back to 1 after every 5000 numbers and can cycle 20 times

D.

IF sequence ORD_SEQ is dropped then the default value for column ORD_NO will be NULL for rows inserted into ORD_ITEMS.

E.

Sequence ORD_SEQ is guaranteed not to generate duplicate numbers.

Question # 13

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

Question # 14

Examine the contents of the EMP table:

Examine this query that executes successfully:

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.

Question # 15

Which two are true about the NVL, NVL2, and COALESCE functions?

A.

The first expression in NVL2 is never returned.

B.

NVL2 can have any number of expressions in the list.

C.

COALESCE stops evaluating the list of expressions when it finds the first null value.

D.

COALESCE stops evaluating the list of expressions when it finds the first non-null value.

E.

NVL must have expressions of the same data type.

F.

NVL can have any number of expressions in the list.

Question # 16

Examine the description of the CUSTOMERS table:

You want to display details of all customers who reside in cities starting with the letter D followed by at least two character.

Which query can be used?

A.

SELECT * FROM customers WHERE city = ' D_% ' ;

B.

SELECT * FROM customers WHERE city = ' %D_ ' ;

C.

SELECT * FROM customers WHERE city LIKE ' D % ' ;

D.

SELECT * FROM customers WHERE city LIKE ' D_ ' ;

Question # 17

You have been asked to create a table for a banking application.

One of the columns must meet three requirements:

1: Be stored in a format supporting date arithmetic without using conversion functions

2: Store a loan period of up to 10 years

3: Be used for calculating interest for the number of days the loan remains unpaid Which data type should you use?

A.

TIMESTAMP WITH TIMEZONE

B.

TIMESTAMP

C.

TIMESTAMP WITH LOCAL TIMEZONE

D.

INTERVAL YEAR TO MONTH

E.

INTERVAL DAY TO SECOND

Question # 18

You execute this command:

ALTER TABLE employees SET UNUSED (department_id);

Which two are true?

A.

A query can display data from the DEPARTMENT_ID column.

B.

The storage space occupied by the DEPARTMENT_ID column is released only after a COMMIT is issued.

C.

The DEPARTMENT_ID column is set to null for all tows in the table

D.

A new column with the name DEPARTMENT_ID can be added to the EMPLOYEES table.

E.

No updates can be made to the data in the DEPARTMENT_ID column.

F.

The DEPARTMENT_ID column can be recovered from the recycle bin

Question # 19

Which two statements are true about the COUNT function?

A.

It can only be used for NUMBER data types.

B.

COUNT (DISTINCT inv_amt) returns the number of rows excluding rows containing duplicates and NULLs in the INV_AMT column

C.

COUNT(*) returns the number of rows in a table including duplicate rows and rows containing NULLs in any column.

D.

A SELECT statement using the COUNT function with a DISTINCT keyword cannot have a WHERE clause.

E.

COUNT(inv_amt) returns the number of rows in a table including rows with NULL in the INV_AMT column.

Question # 20

Table EMPLOYEES contains columns including EMPLOYEE_ID, JOB_ID and SALARY.

Only the EMPLOYEES_ID column is indexed.

Rows exist for employees 100 and 200.

Examine this statement:

UPDATE employees

SET (job_id, salary) =

(SELECT job_id, salary

FROM employees

WHERE employee_id = 200)

WHERE employee id=100;

Which two statements are true?

A.

Employees 100 and 200 will have the same SALARY as before the update command.

B.

Employee 100 will have SALARY set to the same value as the SALARY of employee 200.

C.

Employee 100 will have JOB_ID set to the same value as the JOB_ID of employee 200.

D.

Employees 100 and 200 will have the same JOB ID as before the update command.

E.

Employee 200 will have SALARY set to the same value as the SALARY of employee 100.

F.

Employee 200 will have JOB_ID set to the same value as the JOB_ID of employee 100

Go to page: