Winter Special - Limited Time 65% Discount Offer - Ends in 0d 00h 00m 00s - Coupon code: top65certs

Free and Premium Oracle 1z0-071 Dumps Questions Answers

Page: 1 / 24
Total 326 questions

Oracle Database 12c SQL Questions and Answers

Question 1

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

Options:

A.

intersect ignores nulls.

B.

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

C.

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

D.

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

E.

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

Buy Now
Question 2

Examine the description of the EMPLOYEES table:

Which query is valid?

Options:

A.

SELECT dept_id, join date, SUM(salary) FROM employees GROUP BY dept_id,join_date;

B.

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

C.

SELECT dept_id, AVG(NAX(salary)) FROM employees GROUP BY dept_id;

D.

SELECT dept_id, join_date, SUM(salary) FROM employees GROUP BY dept_id;

Question 3

Examine the data in the PRODUCTS table:

Examine these queries:

1. SELECT prod name, prod list

FROM products

WHERE prod 1ist NOT IN(10,20) AND category _id=1;

2. SELECT prod name, | prod _ list

FROM products

WHERE prod list < > ANY (10,20) AND category _id= 1;

SELECT prod name, prod _ list

FROM products

WHERE prod_ list <> ALL (10, 20) AND category _ id= 1;

Which queries generate the same output?

Options:

A.

1 and 3

B.

1, 2 and 3

C.

2 and 3

D.

1 and 2

Question 4

Examine this statement:

SELECT 1 AS id, ' John' AS first name

FROM DUAL

UNION

SELECT 1 , ' John' AS name

FROM DUAL

ORDER BY 1;

What is returned upon execution?

Options:

A.

0 rows

B.

an error

C.

1 row

D.

2 rows

Question 5

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

Options:

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.

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

D.

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.

E.

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.

F.

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

Question 6

Which three queries use valid expressions?

Options:

A.

SELECT product_id,(unit_price * 0.15 / (4.75 + 552.25)) FROM products;

B.

SELECT product_id,(expiry_date - delivery_date) * 2 FROM products;

C.

SELECT product_id,unit_price || 5 "Discount" , unit_price + surcharge - discount FROM products;

D.

SELECT product_id, expiry_date * 2 from products;

E.

SELECT product_id,unit_price,5 "Discount", unit_price + surcharge-discount FROM products;

F.

SELECT product_id, unit_price, unit_price + surcharge FROM products;

Question 7

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)

Options:

A.

Option A

B.

Option B

C.

Option C

D.

Option D

Question 8

You issued this command: DROP TABLE hr. employees;

Which three statements are true?

Options:

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.

Question 9

Which three statements are true about Structured Query Language (SQL)?

Options:

A.

It guarantees atomicity, consistency, isolation, and durability (ACID) features

B.

It best supports relational databases

C.

It is used to define encapsulation and polymorphism for a relational table

D.

It requires that data be contained in hierarchical data storage

E.

It is the only language that can be used for both relational and object-oriented databases

F.

It provides independence for logical data structures being manipulated from the underlying physical data storage

Question 10

Which three are true about privileges and roles?

Options:

A.

A role is owned by the user who created it.

B.

System privileges always set privileges for an entire database.

C.

All roles are owned by the SYS schema.

D.

A role can contain a combination of several privileges and roles.

E.

A user has all object privileges for every object in their schema by default.

F.

PUBLIC can be revoked from a user.

G.

PUBLIC acts as a default role granted to every user in a database

Question 11

Examine the description of the PRODUCTS table:

Which two statements execute without errors?

Options:

A.

MERGE INTO new_prices n

USING (SELECT * FROM products) p

WHEN MATCHED 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 products WHERE cost>150) p

ON (n.prod_id= p.prod_id)

WHEN MATCHED THEN

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

DELETE WHERE (p.cost<200);

C.

MERGE INTO new_prices n

USING products p

ON (p.prod_id =n.prod_id)

WHEN NOT MATCHED THEN

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

WHERE (p.cost<200);

D.

MERGE INTO new_prices n

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

ON (n.prod_id= p.prod_id)

WHEN MATCHED THEN

DELETE WHERE (p.cost<200)

Question 12

The INVOICE table has a QTY_SOLD column of data type NUMBER and an INVOICE_DATE column of data type DATE NLS_DATE_FORMAT is set to DD-MON-RR.

Which two are true about data type conversions involving these columns in query expressions?

Options:

A.

invoice_date> '01-02-2019': uses implicit conversion

B.

qty_sold ='05549821 ': requires explicit conversion

C.

CONCAT(qty_sold, invoice_date): requires explicit conversion

D.

qty_sold BETWEEN '101' AND '110': uses implicit conversion

E.

invoice_date = '15-march-2019': uses implicit conversion

Question 13

Examine this query:

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

Options:

A.

16

B.

160

C.

150

D.

200

E.

100

Question 14

Examine this partial command:

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

Options:

A.

the DEFAULT DIRECTORY clause

B.

the REJECT LIMIT clause

C.

the LOCATION clause

D.

the ACCESS PARAMETERS clause

E.

the access driver TYPE clause

Question 15

Which three are key components of an Entity Relationship Model?

Options:

A.

a table

B.

an attribute

C.

a unique identifier

D.

an activity

E.

a relationship

F.

an entity

Question 16

Examine the description or the CUSTOMERS table:

For Customers whose income level has a value, you want to display the first name and due amount as 5% of their credit limit. Customers whose due amount is null should not be displayed.

Which query should be used?

Options:

A.

SELECT cust_first_name, cust_credit_limit * .05 AS DUE_AMOUNT FROM customers

WHERE cust_income_level != NULL AND cust_credit_level != NULL;

B.

SELECT cust_first_name, cust_credit_limit * .05 AS DUE_AMONT FROM customers

WHERE cust_income_level <> NULL AND due_amount <> NULL;

C.

SELECT cust_first_name, cust_credit_limit * .05 AS DUE_AMONT FROM customers

WHERE cust_income_level IS NOT NULL AND cust_credit_limit IS NOT NULL;

D.

SELECT cust_first_name, cust_credit_limit * .05 AS DUE_AMONT FROM customers

WHERE cust_income_level IS NOT NULL AND due_amount IS NOT NULL;

E.

SELECT cust_first_name, cust_credit_limit * .05 AS DUE_AMONT FROM customers

WHERE cust_income_level != NULL AND due_amount != NULL;

Question 17

Which is the default column or columns for sorting output from compound queries using SET operators such as INTERSECT in a SQL statement?

Options:

A.

The first column in the last SELECT of the compound query

B.

The first NUMBER column in the first SELECT of the compound query

C.

The first VARCHAR2 column in the first SELECT of the compound query

D.

The first column in the first SELECT of the compound query

E.

The first NUMBER or VARCHAR2 column in the last SELECTof the compound query

Question 18

Which three statements are true about a self join?

Options:

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.

Question 19

Examine these statements which execute successfully:

Both statements display departments ordered by their average salaries.

Which two are true?

Options:

A.

Only the second statement will display departments with no employees.

B.

Only the first statement will display departments with no employees.

C.

Both statements will execute successfully If you add e.avg_sal to the select list.

D.

Both statements will display departments with no employees.

E.

Only the first statement will execute successfully if you add E.AVG_SAK to the select list.

F.

Only the second statement will execute successfully if you add E.AVG_SAL to the select list.

Question 20

Examine the data in the ORDERS table:

Examine the data in the INVOICES table:

Examine this query:

SELECT order_ id, order_ date FROM orders

INTERSECT

SELECT order_ 1d, order_ date FROM invoices;

Which two rows will it return?

Options:

A.

3

B.

2

C.

1

D.

5 01-MAR-2019

E.

4 01-FEB-2019

F.

3 01-JAN-2019

Question 21

Which three statements are true about single row functions?

Options:

A.

They can be used only in the where clause of a select statement.

B.

They can accept only one argument.

C.

They return a single result row per table.

D.

The argument can be a column name, variable, literal or an expression.

E.

They can be nested to any level.

F.

The date type returned can be different from the data type of the argument.

Question 22

Examine this statement,which executes successfully:

In which order are the rows displayed?

Options:

A.

sorted by DEPARTMENT_NAME

B.

sorted by DEPARTMENT_NAME and AVGSAL

C.

sorted by DEPARTMENT_NAME and MAXSAL

D.

sorted by AVGSAL

E.

Sorted by MAXSAL

Question 23

Which statement will return the last sequence number generated by the EMP_ SEQ sequence?

Options:

A.

SELECT NEXTVAL FROM emp_ seq;

B.

SELECT CURRVAL FROM emp_ seq;

C.

SELECT emp_ seq. CURRVAL FROM DUAL;

D.

SELECT emp_ seq . NEXTVAL FROM DUAL;

Question 24

You own table DEPARTMENTS, referenced by views, indexes, and synonyms.

Examine this command which executes successfully:

DROP TABLE departments PURGE;

Which three statements are true?

Options:

A.

Neither can it be rolled back nor can the DEPARTMENTS table be recovered.

B.

It will remove all views that are based on the DEPARTMENTS table.

C.

It will delete all rows from the DEPARTMENTS table, but retain the empty table.

D.

It will remove the DE PARTMENTS table from the database.

E.

It will remove all synonyms for the DEPARTMENTS table.

F.

It will drop all indexes on the DEPARTMENTS table.

Question 25

Which two statements are true regarding a SAVEPOINT?

Options:

A.

Rolling back to a SAVEPOINT can undo a CREATE INDEX statement.

B.

Only one SAVEPOINT may be issued in a transaction.

C.

A SAVEPOINT does not issue a COMMIT

D.

Rolling back to a SAVEPOINT can undo a TRUNCATE statement.

E.

Rolling back to a SAVEPOINT can undo a DELETE statement

Question 26

Which two statements are true about the SET VERIFY ON command?

Options:

A.

It displays values for variables created by the DEFINE command.

B.

It can be used in SQL Developer and SQL*Plus.

C.

It can be used only in SQL*plus.

D.

It displays values for variables prefixed with &&.

E.

It displays values for variables used only in the WHERE clause of a query.

Question 27

Which two statements are true about * _TABLES views?

Options:

A.

You must have ANY TABLE system privileges, or be granted object privilges on the table, to viewa tabl e in DBA TABLES.

B.

USER TABLES displays all tables owned by the current user.

C.

You must have ANY TABLE system privileges, or be granted object privileges on the table, to view a table in USER_TABLES.

D.

ALL TABLES displays all tables owned by the current user.

E.

You must have ANY TABLE system privileges, or be granted object privileges on the table, to view a table in ALL_TABLES.

F.

All users can query DBA_TABLES successfully.

Question 28

Examine the description of the PRODCTS table which contains data:

Which two are true?

Options:

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.

Question 29

Examine the data in the EMPLOYEES table:

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

Options:

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;

Question 30

Which three are true about the MERGE statement?

Options:

A.

It can merge rows only from tables.

B.

It can use views to produce source rows.

C.

It can combine rows from multiple tables conditionally to insert into a single table.

D.

It can use subqueries to produce source rows.

E.

It can update the same row of the target table multiple times.

F.

It can update, insert, or delete rows conditionally in multiple tables.

Question 31

Which three statements are true?

Options:

A.

A customer can exist in many countries.

B.

The statement will fail if a row already exists in the SALES table for product 23.

C.

The statement will fail because subquery may not be I contained in a values clause.

D.

The SALES table has five foreign keys.

E.

The statement will execute successfully and a new row will be inserted into the SALES table.

F.

A product can have a different unit price at different times.

Question 32

Which three are true about granting object privileges on tables, views, and sequences?

Options:

A.

UPDATE can be granted only on tables and views.

B.

DELETE can be granted on tables, views, and sequences.

C.

REFERENCES can be granted only on tables and views.

D.

INSERT can be granted on tables, views, and sequences.

E.

SELECT can be granted only on tables and views.

F.

ALTER can be granted only on tables and sequences.

Question 33

Which statement is true about the INTERSECT operator used in compound queries?

Options:

A.

It processes NULLS in the selected columns.

B.

INTERSECT is of lower precedence than UNION or UNION ALL.

C.

It ignores NULLS.

D.

Multiple INTERSECT operators are not possible in the same SQL statement.

Question 34

Which two queries execute successfully?

Options:

A.

SELECT prod_id, exp_date FROM products

UNION ALL

SELECT prod_id, NULL FROM new_products;

B.

SELECT prod_id, prod_name FROM products

INTERSECT

SELECT 100, prod_name FROM newproducts;

C.

SELECT * FROM products

UNION

SELECT * FROM new_products;

D.

SELECT k FROM products

MINUS

SELECT prod_id FROM new_products;

E.

SELECT prod_id FROM products

UNION ALL

SELECT prod_id, prod_name FROM new_products;

Question 35

Which two are true about constraints?

Options:

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.

Question 36

Examine the data in the COLORS table:

Examine the data in the BRICKS table:

Which two queries return all the rows from COLORS?

Options:

A.

B.

C.

D.

E.

Question 37

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?

Options:

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

Question 38

Which three are true?

Options:

A.

LAST_DAY returns the date of the last day of the current ,month onlyu.

B.

CEIL requires an argument which is a numeric data type.

C.

ADD_MONTHS adds a number of calendar months to a date.

D.

ADD_MONTHS works with a character string that can be implicitlyt converted to a DATE data type.

E.

LAST_DAY return the date of the last day the previous month only.

F.

CEIL returns the largest integer less than or equal to a specified number.

G.

LAST_DAY returns the date of the last day of the month for the date argument passed to the function.

Question 39

Table ORDER_ITEMS contains columns ORDER_ID, UNIT_PRICE and QUANTITY, of data type NUMBER

Statement 1:

SELECT MAX (unit price*quantity) "Maximum Order FROM order items;

Statement 2:

SELECT MAX (unit price*quantity "Maximum order" FROM order items GROUP BY order id;

Which two statements are true?

Options:

A.

Statement 2 returns only one row of output.

B.

Both the statement given the same output.

C.

Both statements will return NULL if either UNIT PRICE or QUANTITY contains NULL,

D.

Statement 2 may return multiple rows of output.

E.

Statement 1 returns only one row of output.

Question 40

Which two statements are true about * TABLES views?

Options:

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.

Question 41

Examine these statements executed in a single Oracle session:

CREATE TABLE product (pcode NUMBER(2),pname VARCHAR2(20));

INSERT INTO product VALUES(1,'pen');

INSERT INTO product VALUES (2,'pencil');

INSERT INTO product VALUES(3,'fountain pen');

SAVEPOINT a;

UPDATE product SET pcode=10 WHERE pcode =1;

COMMIT;

DELETE FROM product WHERE pcode =2;

SAVEPOINT b;

UPDATE product SET pcode=30 WHERE pcode =3;

SAVEPOINT c;

DELETE FROM product WHERE pcode =10;

ROLLBACK TO SAVEPOINT b;

COMMIT;

Which three statements are true?

Options:

A.

The code for pen is 10.

B.

There is no row containing fountain pen.

C.

There is no row containing pencil.

D.

The code for pen is 1.

E.

The code for fountain pen is 3

F.

There is no row containing pen

Question 42

Choose the best answer.

Examine the description of the EMPLOYEES table:

Which query is valid?

Options:

A.

SELECT dept_id, join_date,SUM(salary) FROM employees GROUP BY dept_id, join_date;

B.

SELECT depe_id,join_date,SUM(salary) FROM employees GROUP BY dept_id:

C.

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

D.

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

Question 43

Examine the description of the CUSTOMERS table:

You need to display last names and credit limits of all customers whose last name starts with A or B In lower or upper case, and whose credit limit is below 1000.

Examine this partial query:

SELECT cust_last_nare, cust_credit_limit FROM customers

Which two WHERE conditions give the required result?

Options:

A.

WHERE UPPER(cust_last_name) IN ('A%', 'B%') AND cust_credit_limit < 1000:

B.

WHERE (INITCAP(cust_last_name) LIKE ‘A%' OR ITITCAP(cust_last_name) LIKE ‘B%') AND cust_credit_limit < 1000

C.

WHERE UPPER(cust_last_name) BETWEEN UPPER('A%' AND 'B%’) AND ROUND(cust_credit_limit) < 1000;

D.

WHERE (UPPER(cust_last_name) LIKE 'A%’ OR UPPER(cust_last_name) LIKE ‘B%’) AND ROUND(cust_credit_limit) < 1000;

E.

WHERE (UPPER(cust_last_name) like INITCAP ('A') OR UPPER(cust_last_name) like INITCAP('B')) AND ROUND(cust_credit_limit) < ROUND(1000) ;

Question 44

Examine the description of the PRODUCTS table:

Which three queries use valid expressions?

Options:

A.

SELECT produet_id, unit_pricer, 5 "Discount",unit_price+surcharge-discount FROM products;

B.

SELECT product_id, (unit_price * 0.15 / (4.75 + 552.25)) FROM products;

C.

SELECT ptoduct_id, (expiry_date-delivery_date) * 2 FROM products;

D.

SPLECT product_id, expiry_date * 2 FROM products;

E.

SELEGT product_id, unit_price, unit_price + surcharge FROM products;

F.

SELECT product_id,unit_price || "Discount", unit_price + surcharge-discount FROM products;

Question 45

Which three statements are true about indexes and their administration in an Oracle database?

Options:

A.

An INVISIBLE index is not maintained when Data Manipulation Language (DML) is performed on its underlying table.

B.

An index can be created as part of a CREATE TABLE statement.

C.

A DROP INDEX statement always prevents updates to the table during the drop operation

D.

A UNIQUE and non-unique index can be created on the same table column

E.

A descending index is a type of function-based index

F.

If a query filters on an indexed column then it will always be used during execution of the query

Question 46

Examine the contents of the EMP table:

Examine this query that executes successfully:

What is the result?

Options:

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 47

SELECT *

FROM bricks,colors;

Which two statements are true?

Options:

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.

Question 48

Which three are true about multiple INSERT statements?

Options:

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.

Question 49

Examine the description of the employees table:

Examine these requirements:

1- Display the last name, date of hire and the number of years of service for each employee.

2. If the employee has been employed 5 or more years but less than 10, display -5+ years of service".

3. If the employee has been employed 10 or more years but less than 15, display "10+ years of

service".

4. If the employee has been employed 15 or more years, display "15-*- years of service".

5. If none of these conditions matches, display "<5 years of service".

6. Sort the results by the hire_date column.

Which statement satisfies all the requirements?

A)

B)

C)

D)

Options:

A.

Option A

B.

Option B

C.

Option C

D.

Option D

Question 50

Examine the description products table:

Examine the description of the new_projects table;

Which two queries execute successfully?

A)

B)

C)

D)

E)

Options:

A.

Option A

B.

Option B

C.

Option C

D.

Option D

E.

Option E

Question 51

Examine this query:

SELECT employee_id,first_name,salary

FROM employees

WHERE hire_date>'&1';

Which two methods should you use to prevent prompting for a hire date value when this query is executed?

Options:

A.

Use the DEFINE command before executing the query.

B.

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

C.

Replace'&1' with'&&1' in the query.

D.

Execute the SET VERIFY OFF command before executing the query.

E.

Use the UNDEFINE command before executing the query.

F.

Execute the SET VERIFY ON command before executing the query.

Question 52

Which three statements are true about defining relations between tables in a relational database?

Options:

A.

Foreign key columns allow null values.

B.

Unique key columns allow null values

C.

Primary key columns allow null values.

D.

Every primary or unique key value must refer to a matching foreign key value.

E.

Every foreign key value must refer to a matching primary or unique key value.

Question 53

Which statement executes successfully?

Options:

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;

Question 54

Which two will execute successfully?

Options:

A.

SELECT COALESCR('DATE', SYSDATE) FROM DUAL;

B.

SELECT NVL('DATE',SYSDATE) FROM DUAL;

C.

SELECT COALESCE(O,SYSDATE) TRCH DUAL;

D.

SELECT NVL('DATE',200) FROM (SELECT NULL AS “DATE” FROM DUAL);

E.

SELECT COALESCE('DATE',SYSDATE) FROM (SELECT NULL AS “DATE” FROM DUAL) ;

Question 55

Which two are true about unused columns?

Options:

A.

The DESCRIBE command displays unused columns

B.

A primary key column cannot be set to unused.

C.

A query can return data from unused columns, but no DML is possible on those columns.

D.

Once a column has been set to unused, a new column with the same name can be added to the table.

E.

A foreign key column cannot be set to unused.

F.

Unused columns retain their data until they are dropped

Question 56

Examine this list of queries:

Which two statements are true?

Options:

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.

Question 57

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

Options:

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.

Question 58

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

Options:

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.

Question 59

Which two statements are true?

Options:

A.

AIl conditions evaluated using DECODE can also be evaluated using CASE.

B.

All conditions evaluated using CASE can also be evaluated using DECODE.

C.

CASE is a function and DECODE is not.

D.

DECODE is a function and CASE is not.

E.

Neither CASE nor DECODE is a function.

F.

Both CASE and DECODE are functions.

Question 60

In your session, the NLS._DAE_FORMAT is DD- MM- YYYY.There are 86400 seconds in a day.Examine

this result:

DATE

02-JAN-2020

Which statement returns this?

Options:

A.

SELECT TO_ CHAR(TO_ DATE(‘29-10-2019’) +INTERVAL ‘2’; MONTH + INTERVAL ‘5’; DAY -

INTERVAL ‘86410’ SECOND, ‘ DD-MON-YYYY’) AS "date"

FROM DUAL;

B.

SELECT TO_ CHAR(TO_ DATE(‘29-10-2019’) + INTERVAL ‘3’ MONTH + INTERVAL ‘7’ DAY -

INTERVAL ‘360’ SECOND, ‘ DD-MON-YYYY’) AS "date"

FROM DUAL;

C.

SELECT To CHAR(TO _DATE(‘29-10-2019’) + INTERVAL ‘2’ NONTH + INTERVAL ‘5’ DAY

INEERVAL ‘120’ SECOND, ‘ DD-MON-YYY) AS "date"

FROM DUAL;

D.

SELECT-TO_CHAR(TO _DATE(‘29-10-2019’+ INTERVAL ‘2’ MONTH+INTERVAL ‘6’ DAYINTERVAL

‘120’ SECOND, ‘DD-MON-YY’) AS "daTe"

FROM DUAL;

E.

SELECT-TO_CHAR(TO _DATE(‘29-10-2019’+ INTERVAL ‘2’ MONTH+INTERVAL ‘4’ DAYINTERVAL

‘120’ SECOND, ‘DD-MON-YY’) AS "daTe"

FROM DUAL;

Question 61

You execute this command:

TRUNCATE TABLE depts;

Which two are true?

Options:

A.

It retains the indexes defined on the table.

B.

It drops any triggers defined on the table.

C.

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

D.

It retains the integrity constraints defined on the table.

E.

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

F.

It always retains the space used by the removed rows

Question 62

You have the privileges to create any type of synonym.

Which stalement will create a synonym called EMP for the HCM.EMPLOYEE_RECORDS table that is accesible to all users?

Options:

A.

CREATE GLOBAL SYNONYM emp FOR hcm.employee_records;

B.

CREATE SYNONYM emp FOR hcm.employee_records;

C.

CREATE SYNONYM PUBLIC.emp FOR hcm.employee_records;

D.

CREATE SYNONYM SYS.emp FOR hcm.employee_records;

E.

CREATE PUBLIC SYNONYM emp FOR hcm. employee_records;

Question 63

Which two tasks require subqueries?

Options:

A.

Display the total number of products supplied by supplier 102 which have a product status of obsolete.

B.

Display suppliers whose PROD_LIST_PRICE is less than 1000.

C.

Display the number of products whose PROD_LIST_PRICE is more than the average PROD_LIST_PRICE.

D.

Display the minimum PROD_LIST_PRICE for each product status.

E.

Display products whose PROD_MIN_PRICE is more than the average PROD_LIST_PRICE of all products, and whose status is orderable.

Question 64

Which two are true about the WITH GRANT OPTION clause?

Options:

A.

The grantee can grant the object privilege to any user in the database, with of without including this option.

B.

The grantee must have the GRANT ANY OBJECT PRIVILEGE system prvilege to use this option.

C.

It can be used when granting privileges to roles.

D.

It can be used for system and object privileges.

E.

It cannot be used to pass on privileges to PUBLIC by the grantee.

F.

It can be used to pass on privileges to other users by the grantee.

Question 65

Examine the description of the CUSTOMERS table:

Which three statements will do an implicit conversion?

Options:

A.

SELECT * FROM customers WHERE insert_date=DATE’2019-01-01’;

B.

SELECT * FROM customers WHERE customer_id=’0001’;

C.

SELECT * FROM customers WHERE TO_DATE(insert_date)=DATE’2019-01-01’;

D.

SELECT * FROM customers WHERE insert_date’01-JAN-19’;

E.

SELECT * FROM customers WHERE customer_id=0001;

F.

SELECT * FROM customers WHERE TO_CHAR(customer_id)=’0001’;

Question 66

An Oracle database server session has an uncommitted transaction in progress which updated 5000 rows

in a table.

In which three situations does the transact ion complete thereby committing the updates?

Options:

A.

When the session logs out is successfully

B.

When a DBA issues a successful SHUTDOWN IMMEDIATE statement and the user then issues a COMMIT

C.

When a CREATE INDEX statement is executed successfully in same session

D.

When a COMMIT statement is issued by the same user from another session in the same database instance

E.

When a CREATE TABLE AS SELECT statement is executed unsuccessfully in the same session

F.

When a DBA issues a successful SHUTDOWN TRANSACTIONAL statement and the user, then issues a COMMIT

Question 67

Viev the Exhibit and examine the structure of the PRODUCT INFORMATION and INVENTORIEStables.

You have a requirement from the supplies department to give a list containing PRODUCT _ID,SUPPLIER ID, and QUANTITY_ON HAND for all the products where in QUANTITY ON HAND is lessthan five.

Which two SQL statements can accomplish the task? (Choose two)

Options:

A.

SELECT product id, quantity on hand, supplier id

FROM product information

NATURAL JOIN inventories AND quantity .on hand < 5;

B.

SELECT i. product id, i. quantity .on hand, pi. supplier_id

FROM product_information pi JOIN inventories i

ON (pi. product. id=i. product id) AND quantity on hand < 5;

C.

SELECT i. product_id, i. quantity_on hand, pi. supplier id

FROM product information pi JOIN inventories i USING (product id) AND quantity .on hand < 5;

D.

SELECT i.product id, i. quantity on hand, pi. supplier id

FROM product information pi JOIN inventories i

ON (pi.product id=i. product id)WHERE quantity on hand < 5;

Question 68

Which two are true about the precedence of opertors and condtions

Options:

A.

+ (addition) has a higher order of precedence than * (mliplpition)

B.

NOT has a higher order of precedence than AND and OR in a condition.

C.

AND and OR have the same order of precedence in a condition

D.

Operators are evaluated before conditions.

E.

|| has a higher order of precedence than +(addition)

Question 69

Which three privileges can be restricted to a subset of columns in a table?

Options:

A.

ALTER

B.

REFERENCES

C.

UPDATE

D.

SELECT

E.

INDEX

F.

INSERT

G.

DELETE

Question 70

Which two statements execute successfully?

Options:

A.

SELECT TO_ DATE('2019-DEC-25 15:30', 'YYYY-MON-DD HH24:MI', 'NLS_ DATE_ LANGUAGE

=AMERICAN' ) FROM DUAL;

B.

SELECT TO_CHAR('2019-DEC-25 15:30", YY-MON-D HH24:M2', 'NLS_DATE LANGUAGE =

AMERICAN')

FROM DUAL;

C.

SELECT TO _DATE (TO_ CHAR (‘2019-DEC-25 03:30’, ‘YYYY-MON-DD HH12:MI’))

FROM DUAL;

D.

SELECT TO _ CHAR (TO_ DATE (‘2019-DEC-25 03:30’,’YYYY-MON-DD HH12:MI’))

FROM DUAL

E.

SELECT TO _ CHAR (‘2019-DEC-25 15:30’.’YYYY-MON-DD HH24:MI’)

FROM DUAL

Question 71

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?

Options:

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

Question 72

Which two statements are true about the ORDER BY clause?

Options:

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.

Question 73

Which two statements are true about outer Joins?

Options:

A.

The outer join operator (+) can be used on both sides of the join condition in an outer join.

B.

An outer join is used to retrieve only the rows that do not meet the join condition.

C.

The IN operator cannot be used in a condition that Involves an outer join.

D.

A condition representing an outer join cannot be linked to another condition using the or logical operator.

E.

The outer join operator (+) is used next to the column of the table without the matching rows.

Question 74

Which two are true about granting privilege on objects?

Options:

A.

The owner of an object acquires all object privilege on that object by default.

B.

The WITH GRANT OPTION clause can be used only by DBA users.

C.

A table owner must grant the references privilege to allow other users to create FOREIGN KEY constraints using that table.

D.

An object privilege can be granted to a role only by the owner of that object.

E.

An object privilege can be granted to other users only by the owner of object.

Question 75

You want to write a query that prompts for two column names and the WHERE condition each time It is executed in a session but only prompts for the table name the first time it is executed. The variables used in your

query are never undefined in your session . Which query can be used?

Options:

A.

SELECT &col1, &col2

FROM &&table

WHERE &condition;

B.

SELECT &col1, &col2

FROM “&table”

WHERE &condition;

C.

SELECT &&col1,&&col2

FROM &table

WHERE &&condition= &&cond;

D.

SELECT'&co11','&&co12'

FROM &table

WHERE'&&condition' ='&cond';

E.

SELECT&&col1, &&col2

FROM &table

WHERE &&condition;

Question 76

Which statement will return a comma-separated list of employee names in alphabetical order for each department in the EMP table?

Options:

A.

SELECT deptno,LISTAGG(ename, ' , ') WITHIN GROUP AS employee_list FROM emp GROUP BY deptno;

B.

SELECT deptno,LISTAGG(ename, ', ') WITHIN GROUP AS employee_list FROM emp GROUP BY deptno ORDER BY ename;

C.

SELECT deptno,LISTAGG(ename, ', ') WITHIN GROUP (GROUP BY deptno) AS employee_list FROM emp ORDER BY ename;

D.

SELECT deptno,LISTAGG(ename, ', ') WITHIN GROUP (ORDER BY ename) AS employee_list FROM emp GROUP BY deptno;

Question 77

Which three are true about dropping columns from a table?

Options:

A.

A column can be removed only if it contains no data.

B.

A column drop is implicitly committed

C.

A column that is referenced by another column in any other table cannot be dropped.

D.

A column must be set as unused before it is dropped from a table.

E.

A primary key column cannot be dropped.

F.

Multiple columns can be dropped simultaneously using the ALTER TABLE command.

Question 78

Examine the description of the ENPLOYES table:

Which query requires explicit data type conversion?

Options:

A.

SELECT SUBSTR(join date, 1, 2) - 10 FROM employees;

B.

SELECT join_ date + '20' EROM employees;

C.

SELECT join_ date丨丨‘’丨丨 salary FROM employees;

D.

SELECT join _ date FROM employees WHERE join date > *10-02-2018';

E.

SELECT salary + '120.50' FROM employees;

Question 79

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

Options:

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.

Question 80

Examine the description of EMPLOYEES table:

Which three queries return all rows for which SALARY+COMMISSION is greate than 20000?

Options:

A.

SELECT * FROM employees WHERE salary+NULLF(commission,0)>=20000;

B.

SELECT * FROM employees WHERE salary+NVL2(commission,commission,0)>=20000;

C.

SELECT * FROM employees WHERE NVL2(salary)+commission,salary+commission,

D.

SELECT * FROM employees WHERE salary+NVL(commission,0)>=20000;

E.

SELECT * FROM employees WHERE NVL(salary+commission,0)>=20000;

F.

SELECT * FROM employees WHERE NVL(salary+commission,0)>==20000;

Question 81

Examine the description of the CUSTOMERS table:

Which two SELECT statements will return these results:

CUSTOMER_ NAME

--------------------

Mandy

Mary

Options:

A.

SELECT customer_ name FROM customers WHERE customer_ name LIKE ' % a % ’ ;

B.

SELECT customer_ name FROM customers WHERE customer name LIKE 'Ma%' ;

C.

SELECT customer_ name FROM customers WHERE customer_ name='*Ma*';

D.

SELECT customer_ name FROM customers WHERE UPPER (customer_ name ) LIKE 'MA*. ;

E.

SELECT customer_ name FROM customers WHERE customer name LIKE 'Ma*';

F.

SELECT customer_ name FROM customers WHERE UPPER (customer name) LIKE 'MA&';

G.

SELECT customer_ name FROM customers WHERE customer_ name KIKE .*Ma*';

Question 82

Which three actions can you perform only with system privileges?

Options:

A.

Truncate a table in another schema.

B.

Access flat files via a database, which are stored in an operating system directory.

C.

Log in to a database.

D.

Query any table in a database.

E.

Use the WITH GRANT OPTION clause.

F.

Execute a procedure in another schema.

Question 83

Examine this partial statement:

SELECT ename, sal,comm FROM emp

Now examine this output:

WHICH ORDER BY clause will generate the displayed output?

Options:

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

Question 84

Which three statements are true about single-row functions?

Options:

A.

The data type returned can be different from the data type of the argument.

B.

They can be nested to any level.

C.

They return a single result row per table.

D.

They can accept only one argument.

E.

The argument can be a column name, variable, literal or an expression.

F.

They can be used only in the WHERE clause of a SELECT statement.

Question 85

Examine this list of requirements for a sequence:

1. Name:EMP_SEQ

2. First value returned:1

3. Duplicates are never permitted.

4. Provide values to be inserted into the EMPLOYEES.EMPLOYEE_ID COLUMN.

5. Reduce the chances of gaps in the values.

Which two statements will satisfy these requirements?

Options:

A.

CREATE SEQUENCE emp_seq START WITH 1 INCRENENT BY 1 NOCACHE;

B.

CREATE SEQUENCE emp_seq START WITH 1 INCREMENT BY 1 CYCLE;

C.

CREATE SEQUENCE emp_seq NOCACHE;

D.

CREATE SEQUENCE emp_seq START WITH 1 CACHE;

E.

CREATE SEQUENCE emp_seq START WITH 1 INCREMENT BY 1 CACHE;

F.

CREATE SEQUENCE emp_seq;

Question 86

Which two are true about queries using set operators (UNION, UNION ALL, INTERSECT and MINUS)?

Options:

A.

There must be an equal number of columns in each SELECT list.

B.

The name of each column in the first SELECT list must match the name of the corresponding column in each subsequent SELECT list.

C.

Each SELECT statement in the query can have an ORDER BY clause.

D.

None of the set operators can be used when selecting CLOB columns.

E.

The FOR UPDATE clause cannot be specified.

Question 87

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?

Options:

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 88

Examine the description of the BRICKS table;

Examine the description of the BRICKS_STAGE table;

Which two queries execute successfully?

Options:

A.

SELECT shape,color,weight from bricks

MINUS

SELECT * FROM bricks_stage;

B.

SELECT shape,color FROM bricks

MINUS

SELECT WEIGHT,color FROM bricks_stage;

C.

select * from bricks

MINUS

select * from bricks_stage;

D.

SELECT shape,color FROM bricks

MINUS

SELECT color,shape FROM bricks_stage;

E.

SELECT brick_id,shape FROM bricks

MINUS

SELECT WEIGHT,COLOR from bricks_stage;

Question 89

Which two statements about INVISIBLE indexes are true?

Options:

A.

an INVISIBLE Index consumes no storage

B.

You can only create one INVISIBLE index on the same column list

C.

The query optimizer never considers INVISIBLE Indexes when determining execution plans

D.

You use AlTER INDEX to make an INVISIBLE Index VISIBLE

E.

All INSERT, UPDATE, and DELETE statements maintain entries in the index

Question 90

Which two queries only return CUBE?

Options:

A.

SELECT shape FROM bricks JOIN boxes ON weight >= min_weight AND weight < max_weight;

B.

SELECT shape FROM bricks JOIN boxes ON weight > min_weight;

C.

SELECT shape FROM bricks JOIN boxes ON weight BETWEEN min_weight AND max_weight;

D.

SELECT shape FROM bricks JOIN boxes ON weight < max_weight;

E.

SELECT shape FROM bricks JOIN boxes ON NOT (weight > max_weight);

Question 91

Examine this SQL statement

DELETE FROM employees e

WHERE EXISTS

(SELECT' dummy'

FROM emp history

WHERE employee_ id= e. employee id);

Which two are true?

Options:

A.

The subquery is not a correlated subquery.

B.

The subquery is executed before the DELETE statement is executed.

C.

All existing rows in the EMPLOYEES table are deleted,

D.

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

E.

The subquery is executed for every row in the EMPLOYEES table.

Question 92

Which two queries will result in an error?

Options:

A.

SELECT FIRST_NAME LAST_NAME FROM EMPLOYEES;

B.

SELECT FIRST_NAME,LAST_NAME FROM EMPLOYEES;

C.

SELECT LAST_NAME,12 * SALARY AS ANNUAL_SALARY

FROM EMPLOYEES

WHERE ANNUAL_SALARY > 100000

ORDER BY 12 * SALARY ;

D.

SELECT LAST_NAME,12 * SALARY AS ANNUAL_SALARY

FROM EMPLOYEES

WHERE 12 * SALARY > 100000

ORDER BY ANNUAL_SALARY;

E.

SELECT LAST_NAME,12 * SALARY AS ANNUAL_SALARY

FROM EMPLOYEES

WHERE 12 * SALARY > 100000

ORDER BY 12 * SALARY;

F.

SELECT LAST_NAME,12 * SALARY AS ANNUAL_SALARY

FROM EMPLOYEES

WHERE ANNUAL_SALARY > 100000

ORDER BY ANNUAL_SALARY;

Question 93

Which three statements are true about the DESCRIBE command?

Options:

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.

Question 94

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 SALIES2 table.

Which set operator generates the required output?

Options:

A.

SUBTRACT

B.

INTERSECT

C.

UNION ALL

D.

MINUS

E.

UNION

Question 95

Which two statements are true about truncate and delete?

Options:

A.

the result of a delete can be undone by issuing a rollback

B.

delete can use a where clause to determine which row(s) should be removed.

C.

TRUNCATE can use a where clause to determine which row(s) should be removed.

D.

truncate leavers any indexes on the table in an UNUSABLE STATE.

E.

the result of a truncate can be undone by issuing a ROLLBACK.

Question 96

Which two statements are true about Oracle synonyms?

Options:

A.

A synonym can have a synonym.

B.

All private synonym names must be unique in the database.

C.

Any user can create a PUBLIC synonym.

D.

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

E.

A synonym has an object number.

Question 97

Examine the description of the EMPLOYEES table:

You write this failing statement:

SELECT dept_no AS department_id, MAX (salary) As max_sal

FROM employees

WHERE salary >10000

GROUP BY department_id

ORDER BY max_sal;

Which clause causes the error?

Options:

A.

ORDER BY

B.

WHERE

C.

GROUP BY

D.

SELECT

Page: 1 / 24
Total 326 questions