1z0-071 Practice Test Questions

360 Questions


You issued the following command:
SQL> DROP TABLE employees;
Which three statements are true?


A.

All uncommitted transactions are committed.


B.

All indexes and constraints defined on the table being dropped are also dropped.


C.

Sequences used in the employees table become invalid.


D.

The space used by the employees table is reclaimed immediately.


E.

The employees table can be recovered using the rollback command.


F.

The employees table is moved to the recycle bin





A.
  

All uncommitted transactions are committed.



B.
  

All indexes and constraints defined on the table being dropped are also dropped.



F.
  

The employees table is moved to the recycle bin



Which two statements are true regarding working with dates? (Choose two.)


A.

The RR date format automatically calculates the century from the SYSDATE function
but allows the session user to enter the century.


B.

The RR date format automatically calculates the century from the SYSDATE function
and does not allow a session user to enter the century.


C.

 The default internal storage of dates is in character format.


D.

The default internal storage of dates is in numeric format.





A.
  

The RR date format automatically calculates the century from the SYSDATE function
but allows the session user to enter the century.



D.
  

The default internal storage of dates is in numeric format.



Which statement is true regarding external tables?


A.

The CREATE TABLE AS SELECT statement can be used to upload data into regular
table in the database from an external table.


B.

The data and metadata for an external table are stored outside the database.


C.

The default REJECT LIMIT for external tables is UNLIMITED.


D.

ORACLE_LOADER and ORACLE_DATAPUMP have exactly the same functionality
when used with an external table.





A.
  

The CREATE TABLE AS SELECT statement can be used to upload data into regular
table in the database from an external table.



References:
https://docs.oracle.com/cd/B28359_01/server.111/b28310/tables013.htm

Which three statements are true regarding the SQL WHERE and HAVING clauses?


A.

The HAVING clause conditions can have aggregating functions.


B.

The HAVING clause conditions can use aliases for the columns.


C.

The WHERE and HAVING clauses cannot be used together in a SQL statement.


D.

The WHERE clause is used to exclude rows before grouping data.


E.

The HAVING clause is used to exclude one or more aggregated results after grouping
data.





A.
  

The HAVING clause conditions can have aggregating functions.



D.
  

The WHERE clause is used to exclude rows before grouping data.



E.
  

The HAVING clause is used to exclude one or more aggregated results after grouping
data.



Which statement is true about Data Manipulation Language (DML)?


A.

DML automatically disables foreign ley constraints when modifying primary key values in
the parent table.


B.

Each DML statement forms a transaction by default.


C.

A transaction can consist of one or more DML statements.


D.

DML disables foreign key constraints when deleting primary key values in the parent
table, only when the ON DELETE CASCADE option is set for the foreign key constraint.





C.
  

A transaction can consist of one or more DML statements.



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





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.



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';





C.
  

SELECT last_name, city FROM members WHERE state IN ('MO', 'MI');



The first DROP operation is performed on PRODUCTS table using the following command:
DROP TABLE products PURGE;
Then you performed the FLASHBACK operation by using the following command:
FLASHBACK TABLE products TO BEFORE DROP;
Which statement describes the outcome of the FLASHBACK command?


A.

It recovers only the table structure.


B.

It recovers the table structure, data, and the indexes.


C.

It recovers the table structure and data but not the related indexes.


D.

It is not possible to recover the table structure, data, or the related indexes.





D.
  

It is not possible to recover the table structure, data, or the related indexes.



References:
https://docs.oracle.com/cd/B19306_01/server.102/b14200/statements_9003.htm

A non-correlated subquery can be defined as __________. (Choose the best answer.)


A.

A set of one or more sequential queries in which generally the result of the inner query is
used as the search value in the outer query.


B.

A set of sequential queries, all of which must return values from the same table.


C.

A set of sequential queries, all of which must always return a single value.


D.

A SELECT statement that can be embedded in a clause of another SELECT statement only.





A.
  

A set of one or more sequential queries in which generally the result of the inner query is
used as the search value in the outer query.



Evaluate the following SQL statements that are issued in the given order:
CREATE TABLE emp
(emp_no NUMBER(2) CONSTRAINT emp_emp_no_pk PRIMARY KEY,
ename VARCHAR2(15),
salary NUMBER (8,2),
mgr_no NUMBER(2) CONSTRAINT emp_mgr_fk REFERENCES emp(emp_no));
ALTER TABLE emp
DISABLE CONSTRAINT emp_emp_no_pk CASCADE;
ALTER TABLE emp
ENABLE CONSTRAINT emp_emp_no_pk;
What would be the status of the foreign key EMP_MGR_PK?


A.

It would remain disabled and can be enabled only by dropping the foreign key constraint
and recreating it.


B.

It would remain disabled and has to be enabled manually using the ALTER TABLE
command.


C.

It would be automatically enabled and immediate.


D.

It would be automatically enabled and deferred.





B.
  

It would remain disabled and has to be enabled manually using the ALTER TABLE
command.



Examine the commands used to create the DEPARTMENT_DETAILS and the COURSEDETAILS
tables:
SQL> CREATE TABLE DEPARTMfiNT_D£TAILS
DEPARTMENT_ID NUMBER PRIMARY KEY ,
DEPARTMEHT_NAME VARCHAR2(50) ,
HOD VARCHAP2(50));
SQL> CREATE TABLE COURSE-DETAILS
(COURSE ID NUMBER PRIMARY KEY ,
COURS_NAME VARCHAR2 (50) ,
DEPARTMEHT_ID NUMBER REFERENCES DEPARTMENT_DETAIL
You want to generate a list of all department IDs along with any course IDs that may have
been assigned to them.
Which SQL statement must you use?


A.

SELECT d.departranc_id, c.cours«_id FROM cource_deatils c LEFT OUTER JOIN
departmnt_details d ON (c.dapartmsnt_id=d.departtnent_id);


B.

SELECT d.department_id, c. course_id FROM dapartment_details d RIGHT OUTER
JOIN course_dotails c ON (c.depattnient_id=d.department_id) ;


C.

SELECT d.department id. ccours_id FROM department_details d RIGHT OUTER JOIN
course_details c ON (d.department_id);


D.

SELECT d.department_id, c.course_id FROM department_details d LEFT OUTER JOIN
course_details c ON (d.department___id).- (DEPARTMENT_ID) ;





D.
  

SELECT d.department_id, c.course_id FROM department_details d LEFT OUTER JOIN
course_details c ON (d.department___id).- (DEPARTMENT_ID) ;



The BOOKS_TRANSACTIONS table exists in your schema in this database.
You execute this SQL statement when connected to your schema in your database
instance.
SQL> SELECT * FROM books_transactions ORDER BY 3;
What is the result?


A.

The execution fails unless the numeral 3 in the ORDER BY clause is replaced by a column name.


B.

B. All table rows are displayed sorted in ascending order of the values in the third column.


C.

The first three rows in the table are displayed in the order that they are stored.


D.

Only the three rows with the lowest values in the key column are displayed in the order
that they are stored





B.
  

B. All table rows are displayed sorted in ascending order of the values in the third column.




Page 14 out of 30 Pages
Previous