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

1z0-071 Oracle Database 12c SQL Questions and Answers

Questions 4

Which two statements are true about single row functions?

Options:

A.

CONCAT: can be used to combine any number of values

B.

MOD: returns the quotient of a division operation

C.

CEIL: can be used for positive and negative numbers

D.

FLOOR: returns the smallest integer greater than or equal to a specified number

E.

TRUNC: can be used with NUMBER and DATE values

Buy Now
Questions 5

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

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.

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.

Buy Now
Questions 6

Examine the BRICKS table:

You write this query:

SELECT

FROM bricks b1 CROSS JOIN bricks b2

WHERE b1. Weight < b2. Weight:

How many rows will the query return?

Options:

A.

1

B.

16

C.

10

D.

6

E.

4

F.

0

Buy Now
Questions 7

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

Buy Now
Questions 8

Which three statements are true about multiple row subqueries?

Options:

A.

They can contain HAVING clauses.

B.

Two or more values are always returned from the subquery.

C.

They cannot contain subquery.

D.

They can return multiple columns.

E.

They can contain GROUP BY clauses.

Buy Now
Questions 9

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

Options:

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.

Buy Now
Questions 10

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;

Buy Now
Questions 11

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?

Options:

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

Buy Now
Questions 12

Which two statements are true about INTERVAL data types

Options:

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.

Buy Now
Questions 13

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

Buy Now
Questions 14

The CUSTOMERS table has a CUST_CREDT_LIMIT column of data type number.

Which two queries execute successfully?

Options:

A.

SELECT TO_CHAR(NVL(cust_credit_limit * .15,'Not Available')) FROM customers;

B.

SELECT NVL2(cust_credit_limit * .15,'Not Available') FROM customers;

C.

SELECT NVL(cust_credit_limit * .15,'Not Available') FROM customers;

D.

SLECT NVL(TO_CHAR(cust_credit_limit * .15),'Not available') from customers;

E.

SELECT NVL2(cust_credit_limit,TO_CHAR(cust_credit_limit * .15),'NOT Available') FROM customers;

Buy Now
Questions 15

Which statement fails to execute successfully?

A)

B)

C)

D)

Options:

A.

Option A

B.

Option B

C.

Option C

D.

Option D

Buy Now
Questions 16

Examine this description of the PRODUCTS table:

Rows exist in this table with data in all the columns. You put the PRODUCTS table in read-only mode. Which three commands execute successfully on PRODUCTS?

Options:

A.

ALTER TAELE products DROP COLUMN expiry_date;

B.

CREATE INDEX price_idx on products (price);

C.

ALTER TABLE products SET UNUSED(expiry_date);

D.

TRUNCATE TABLE products;

E.

ALTER TABLE products DROP UNUSED COLUMNS

F.

DROP TABLE products

Buy Now
Questions 17

Which two are true about the data dictionary?

Options:

A.

Base tables in the data dictionary have the prefix DBA_.

B.

All user actions are recorded in the data dictionary.

C.

The data dictionary is constantly updated to reflect changes to database objects, permissions, and data.

D.

All users have permissions to access all information in the data dictionary by default

E.

The SYS user owns all base tables and user-accessible views in the data dictionary.

Buy Now
Questions 18

View the Exhibit and examine the structure of the ORDERS table.

The columns ORDER_MODE and ORDER TOTAL have the default values'direct “and respectively.

Which two INSERT statements are valid? (Choose two.)

Options:

A.

INSERT INTO (SELECT order_id, order date, customer_id FROM orders) VALUES (1, ‘09-mar-2007“,101);

B.

INSERT INTO orders (order_id, order_date, order mode,customer_id, order_total) VALUES (1, TO_DATE (NULL),‘online‘,101, NULL) ;

C.

INSERT INTO orders VALUES (1, ‘09-mar-2007’, ‘online’,’ ’,1000);

D.

INSERT INTO orders (order id, order_date, order mode, order_total)VALUES (1,‘10-mar-2007’,’online’, 1000)

E.

INSERT INTO orders VALUES(‘09-mar-2007’,DEFAULT,101, DEFALLT);

Buy Now
Questions 19

Examine the description of the PRODUCT_INFORMATION table:

Options:

A.

SELECT (COUNT(list_price) FROM Product_intormation WHERE list_price=NULL;

B.

SELECT count(nvl( list_price,0)) FROM product_information WHERE list_price is null;

C.

SELECT COUNT(DISTINCT list_price) FROM product_information WHERE list_price is null.

D.

BELECT COUNT(list_price) FROM product_information where list_price is NULL;

Buy Now
Questions 20

Which three are true about the CREATE TABLE command?

Options:

A.

It can include the CREATE...INDEX statement for creating an index to enforce the primary key constraint.

B.

The owner of the table should have space quota available on the tablespace where the table is defined.

C.

It implicitly executes a commit.

D.

It implicitly rolls back any pending transactions.

E.

A user must have the CREATE ANY TABLE privilege to create tables.

F.

The owner of the table must have the UNLIMITED TABLESPACE system privilege.

Buy Now
Questions 21

.No user-defined locks are used in your database.

Which three are true about Transaction Control Language (TCL)?

Options:

A.

COMMIT erases all the transaction’s savepoints and releases its locks.

B.

COMMIT ends the transaction and makes all its changes permanent.

C.

ROLLBACK without the TO SAVEPOINT clause undoes all the transaction's changes but does not release its locks.

D.

ROLLBACK to SAVEPOTNT undoes the transaction's changes made since the named savepoint and then ends the transaction.

E.

ROLLBACK without the TO SAVEPOINT clause undoes alt the transaction's changes, releases its locks, and erases all its savepoints.

F.

ROLLBACK without the TO SAVEPOINT clause undoes all the transaction's changes but does not erase its savepoints.

Buy Now
Questions 22

Which two statements are true about the order by clause when used with a sql statement containing a set operator such as union?

Options:

A.

column positions must be used in the order by clause.

B.

The first column in the first select of the compound query with the union operator is used by default to sort output in the absence of an order by clause.

C.

Each select statement in the compound query must have its own order by clause.

D.

only column names from the first select statement in the compound query are recognized.

E.

Each select statement in the compound query can have its own order by clause.

Buy Now
Questions 23

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

Options:

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.

Buy Now
Questions 24

Which statement is true regarding the SESSION_PRIVS dictionary view?

Options:

A.

It contains the object privileges granted to other users by the current user session.

B.

It contains the system privileges granted to other users by the current User session.

C.

It contains the current system privileges available in the user session.

D.

It contains the current object privileges available in the user session.

Buy Now
Questions 25

Which three statements are true about built-in data types?

Options:

A.

A VARCHAR2 blank-pads column values only if the data stored is non-numeric and contains no special characters.

B.

The default length for a CHAR column is always one character.

C.

A VARCHAR2 column definition does not require the length to be specified.

D.

A BLOB stores unstructured binary data within the database.

E.

A CHAR column definition does not require the length to be specified.

F.

A BFILE stores unstructured binary data in operating system files.

Buy Now
Questions 26

Which two are true about scalar subquery expressions?

Options:

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.

Buy Now
Questions 27

Which two statements are true about a self join?

Options:

A.

The join key column must have an index.

B.

It can be a left outer join.

C.

It must be a full outer join.

D.

It can be an inner join.

E.

It must be an equijoin.

Buy Now
Questions 28

Examine this statement:

SELECT1 AS id,‘ John’ AS first_name, NULL AS commission FROM dual

INTERSECT

SELECT 1,’John’ null FROM dual ORDER BY 3;

What is returned upon execution?[

Options:

A.

2 rows

B.

0 rows

C.

An error

D.

1 ROW

Buy Now
Questions 29

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.

Buy Now
Questions 30

Examine this description of the EMP table:

You execute this query:

SELECT deptno AS "departments", SUM (sal) AS "salary"

FROM emp

GROUP | BY 1

HAVING SUM (sal)> 3 000;

What is the result?

Options:

A.

only departments where the total salary is greater than 3000, returned in no particular order

B.

all departments and a sum of the salaries of employees with a salary greater than 3000

C.

an error

D.

only departments where the total salary is greater than 3000, ordered by department

Buy Now
Questions 31

Which two queries return the string Hello! we're ready?

Options:

A.

SELECT q'! Hello! We're ready! 'FROM DUAL;

B.

SELECT "Hello! We're ready "FROM |DUAL;

C.

SELECT q'[Hello! We're ready]'FROM DUAL;

D.

SELECT 'Hello! we\ re ready' ESCAPE'N'FROMDUAL:

E.

SELECT 'Hello! We're ready' FROM DUAL;

Buy Now
Questions 32

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

Buy Now
Questions 33

Examine the description of the PROMTIONS table:

You want to display the unique promotion costs in each promotion category.

Which two queries can be used?

Options:

A.

SELECT promo_cost, | pxomo_category FROM promotions ORDER BY 1;

B.

SELECT promo_category, DISTINCT promo_cost PROM promotions ORDER BY 2:

C.

SELECT DISTINCT promo_category ||'has’|| promo_cost AS COSTS FROM promotions ORDER BY 1;

D.

SELECT DISTINCT promo_category, promo_cost FROM promotions ORDER BY 1;

E.

SELECT DISTINCT promo_cost ||' in' II DISTINCT promo_category FROM promotions ORDER BY 1;

Buy Now
Questions 34

In the PROMOTIONS table, the PROMO_BEGTN_DATE column is of data type DATE and the default date format is DD-MON-RR.

Which two statements are true about expressions using PROMO_BEGIN_DATE contained in a query?

Options:

A.

TO_NUMBER(PROMO_BEGIN_DATE)-5 will return number

B.

TO_DATE(PROMO_BEGIN_DATE * 5) will return a date

C.

PROMO_BEGIN_DATE-SYSDATE will return a number.

D.

PROMO_BEGIN_DATE-5 will return a date.

E.

PROMO_BEGIN_DATE-SYSDATE will return an error.

Buy Now
Questions 35

Which two statements are true about conditional INSERT ALL?

Options:

A.

Each row returned by the subquery can be inserted into only a single target table.

B.

It cannot have an ELSE clause.

C.

The total number of rows inserted is always equal to the number of rows returned by the subquery

D.

A single WHEN condition can be used for multiple INTO clauses.

E.

Each WHEN condition is tested for each row returned by the subquery.

Buy Now
Questions 36

Which three are true about scalar subquery expressions?

Options:

A.

A scalar subquery expression that returns zero rows evaluates to zoro

B.

They cannot be used in the values clause of an insert statement*

C.

They can be nested.

D.

A scalar subquery expression that returns zero rows evaluates to null.

E.

They cannot be used in group by clauses.

F.

They can be used as default values for columns in a create table statement.

Buy Now
Questions 37

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

Buy Now
Questions 38

Examine this SQL statement:

Which two are true?

Options:

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.

Buy Now
Questions 39

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

Buy Now
Questions 40

Which statements is true about using functions in WHERE and HAVING?

Options:

A.

using single-row functions in the WHERE clause requires a subquery

B.

using single-row functions in the HAVING clause requires a subquery

C.

using aggregate functions in the WHERE clause requires a subquery

D.

using aggregate functions in the HAVING clause requires a subquery

Buy Now
Questions 41

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;

Buy Now
Questions 42

Which two true about a sql statement using SET operations such as UNION?

Options:

A.

The data type of each column returned by the second query must be implicitly convertible to the data type of the corresponding column returned by the first query

B.

The data type of each column retuned by the second query must exactly match the data type of the corresponding column returned by the first query

C.

The number, but not names, of columns must be identical for all SELECT statements in the query

D.

The data type group of each column returned by the second query must match the data type group of the corresponding column returned by the first query

E.

The names and number of columns must be identical for all SELECT statements in the query.

Buy Now
Questions 43

Examine the data in the ENPLOYEES table:

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

Options:

A.

SECECT last_namo, (menthy_salary + monthly_commission_pct) * 12 AS annual_comp

FROM employees;

B.

SELCECT last_namo, (monthly_salary * 12) + (monthly_commission_pct * 12) AS annual_comp

FROM employees

C.

SELCECT last_namo, (monthly_salary * 12) + (menthy_salary * 12 * NVL

(monthly_commission_pct, 0)) AS annual_comp FROM employees

D.

SELCECT last_namo, (monthly_salary * 12) + (menthy_salary * 12 * monthly_commission_pct)

AS annual_comp FROM employees

Buy Now
Questions 44

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

Buy Now
Questions 45

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.

Buy Now
Questions 46

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

Options:

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.

Buy Now
Questions 47

Which three statements about roles are true?

Options:

A.

Roles are assigned to roles using the ALTER ROLE statement.

B.

A single user can be assigned multiple roles.

C.

Roles are assigned to users using the ALTER USER statement.

D.

A single role can be assigned to multiple users.

E.

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

F.

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

G.

Privileges are assigned to a role using the GRANT statement.

Buy Now
Questions 48

Examine the description of the EMPLOYEES table:

Which statement will execute successfully, returning distinct employees with non-null first names?

Options:

A.

SELECT DISTINCT * FROM employees WHERE first_ name IS NOT NULL;

B.

SELECT first_ name, DISTNCT last_ name FROM employees WHERE first_ name IS NOT NULL;

C.

SELECT Distinct * FROM employees WHERE first_ name < > NULL;

D.

SELECT first_ name, DISTINCT last_ name FROM employees WHERE first_ name < > NULL;

Buy Now
Questions 49

Which two statements are true about Entity Relationships?

Options:

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

Buy Now
Questions 50

Which two statements are true regarding non equijoins?

Options:

A.

The ON clause can be used.

B.

The USING clause can be used.

C.

The SQL:1999 compliant ANSI join syntax must be used.

D.

Table aliases must be used.

E.

The Oracle join syntax can be used.

Buy Now
Questions 51

Which two actions can you perform with object privileges?

Options:

A.

Create roles.

B.

Delete rows from tables in any schema except sys.

C.

Set default and temporary tablespaces for a user.

D.

Create FOREIGN KEY constraints that reference tables in other schemas.

E.

Execute a procedure or function in another schema.

Buy Now
Questions 52

Which two statements are true about Oracle synonyms?

Options:

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.

Buy Now
Questions 53

Which two statements are true? (Choose two.)

Options:

A.

The USER SYNONYMS view can provide information about private synonyms.

B.

The user SYSTEM owns all the base tables and user-accessible views of the data dictionary.

C.

All the dynamic performance views prefixed with V$ are accessible to all the database users.

D.

The USER OBJECTS view can provide information about the tables and views created by the user only.

E.

DICTIONARY is a view that contains the names of all the data dictionary views that the user can access.

Buy Now
Questions 54

Examine the description of the PRODUCT_ STATUS table:

The STATUS column contains the values IN STOCK or OUT OF STocK for each row.

Which two queries will execute successfully?

Options:

A.

SELECT prod_id ||q’(‘ s not available)’ ‘CURRENT AVAILABILITY’ FROM

product_ status WHERE status = ‘OUT OF STOCK’

B.

SELECT prod_id ||q”‘ s not available” FROM

product_ status WHERE status = ‘OUT OF STOCK’;

C.

SELECT PROD_ID||q’(‘s not available)’ FROM

product_ status WHERE status = ‘OUT OF STOCK’;

D.

SELECT PROD_ID||q’(‘s not available)’ “CURRENT AVAILABILITY”

FROM product_ status WHERE status = ‘OUT OF STOCK’;

E.

SELECT prod_id q’s not available” from product_ status WHERE status = ‘OUT OF STOCK’;

F.

SELECT prod_id “CURRENT AVAILABILITY”||q’ (‘s not available)’ from product_ status WHERE status

= ‘OUT OF STOCK’;

Buy Now
Questions 55

Examine the data in the EMP table:

You execute this query:

SELECT deptno AS "Department", AVG(sal) AS AverageSalary, MAX(sal) AS "Max Salary"

FROM emp

WHERE sal >= 12000

GROUP BY "Department "

ORDER BY AverageSalary;

Why does an error occur?

Options:

A.

An alias name must not be used in an ORDER BY clause.

B.

An allas name must not contain space characters.

C.

An alias name must not be used in a GROUP BY clause.

D.

An alias name must always be specified in quotes.

Buy Now
Questions 56

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.

Buy Now
Questions 57

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.

Buy Now
Questions 58

Which two statements are true about dropping views?

Options:

A.

Views referencing a dropped view become invalid.

B.

Read only views cannot be dropped.

C.

Data selected by a view's defining query is deleted from its underlying tables when the view is dropped.

D.

The creator of a view to be dropped must have the drop any view privilege.

E.

CASCADE CONSTRAINTS must be specified when referential integrity constraints on other objects refer to primary or unique keys in the view to be dropped.

Buy Now
Questions 59

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;

Buy Now
Questions 60

Examine this statement which executes successfully:

Which three are true?

Options:

A.

Regardless of salary,only if the employee id is less than 125,insert EMPLOYEE_ID,NANAGER_ID,SALARY into the MGR_HISTORY table.

B.

If the salary is more than 20000 and the employee is less than 125,insert EMPLOYEE_ID and SALARY into the SPECIAL_SAL table.

C.

Only if the salary is 20000 or less and the employee id is less than 125,insert EMPLOYEE_ID,MANAGER_ID,and SALARY into the MGR_HISTORY table.

D.

Regardless of salary and employee id,insert EMPLOYEE_ID,MANAGER_ID,and SALARY into the MGR_HISTORY table.

E.

If the salary is 20000 or less and the employee id is less than 125,insert EMPLOYEE_ID,HIRE_DATE,and SALARY into the SAL_HISTORY table.

F.

Only if the salary is 20000 or less and the employee id is 125 or higher,insert EMPLOYEE_ID,MANAGER_ID,and SALARY into the MDR_HISTORY table.

Buy Now
Questions 61

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.

Buy Now
Questions 62

Which two are true about using constraints?

Options:

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.

Buy Now
Questions 63

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

Buy Now
Questions 64

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.

Buy Now
Questions 65

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.

Buy Now
Questions 66

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.

Buy Now
Questions 67

Examine this query:

SELECT INTERVAL '100' MONTH DURATION FROM DUAL;

What will be the output?

Options:

A.

DURATION

+08-04

B.

DUFATION

+100

C.

DURATION

+08

D.

an error

Buy Now
Questions 68

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

Buy Now
Questions 69

Examine the data in the CUST NAME column of the CUSTOMERS table:

CUST_NAME

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

Renske Ladwig

Jason Mallin

Samuel McCain

Allan MCEwen

Irene Mikkilineni

Julia Nayer

You want to display the CUST_NAME values where the last name starts with Mc or MC. Which two WHERE clauses give the required result?

Options:

A.

WHERE INITCAP (SUBSTR(cust_name, INSTR(cust_name,'') +1)) IN ('MC%','Mc%)

B.

WHERE UPPER (SUBSTR(cust_name, INSTR(cust_name, '') +1)) LIKE UPPER('MC%')

C.

WHERE INITCAP(SUBSTR(cust_name, INSTR(cust_name,'') +1)) LIKE'Mc%'

D.

WHERE SUBSTR(cust_name,INSTR(cust_name,'') +1) LIKE'Mc%' OR'MC%'

E.

WHERE SUBSTR(cust_name, INSTR(cust_name,'') +1) LIKE'Mc%'

Buy Now
Questions 70

Examine the description of the ORDERS table:

Which three statements execute successfully?

Options:

A.

(SELECT * FROM orders

UNION ALL

SELECT* FROM invoices) ORDER BY order _id;

B.

SELECE order _id, order _ date FRON orders

LNTERSECT

SELECT invoice_ id, invoice_ id, order_ date FROM orders

C.

SELECT order_ id, invoice_ data order_ date FROM orders

MINUS

SELECT invoice_ id, invoice_ data FROM invoices ORDER BY invoice_ id;

D.

SELECT * FROM orders ORDER BY order_ id

INTERSEOT

SELECT * FROM invoices ORDER BY invoice_ id;

E.

SELECT order_ id, order_ data FROM orders

UNION ALL

SELECT invoice_ id, invoice_ data FROM invoices ORDER BY order_ id;

F.

SELECT * FROM orders

MINUS

SELECT * FROM INVOICES ORDER BY 1

G.

SELECT * FROM orders ORDER BY order_ id

UNION

SELECT * FROM invoices;

Buy Now
Questions 71

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

Options:

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.

Buy Now
Questions 72

Which three statements are true about Oracle synonyms?

Options:

A.

A synonym cannot be created for a PL /SQL package.

B.

A SEQUENCE can have a synonym.

C.

A synonym can be available to all users .

D.

A synonym created by one user can refer to an object belonging to another user.

E.

Any user can drop a PUBLIC synonym.

Buy Now
Questions 73

Which three are true about subqueries?

Options:

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.

Buy Now
Questions 74

Examine the description of the EMPLOYEES table:

Which two queries return the highest salary in the table?

Options:

A.

SELECT department_id, MAX(salary)

FROM employees

GROUP BY department_id;

B.

SELECT MAX (salary)

FROM employees;

C.

SELECT MAX (salary)

FROM employees

GROUP BY department_id;

D.

SELECT MAX (salary)

FROM employees

GROUP BY department_id

HAVING MAX (salary) = MAX (MAX (salary));

E.

SELECT MAX (MAX (salary))

FROM employees

GROUP BY department_id;

Buy Now
Questions 75

Which two are true?

Options:

A.

CONCAT joins two or more character strings together.

B.

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

C.

CONCAT joins two character strings together.

D.

INSTR finds the offset within a string of a single character only.

E.

INSTR finds the offset within a character string, starting from position 0.

F.

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

Buy Now
Questions 76

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

Buy Now
Questions 77

You execute this command:

TRUNCATE TABLE dept;

Which two are true?

Options:

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.

Buy Now
Questions 78

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

Buy Now
Questions 79

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?

Options:

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%’)

Buy Now
Questions 80

Examine the command to create the BOOKS table.

SQL> create table books(book id CHAR(6) PRIMARY KEY,

title VARCHAR2(100) NOT NULL,

publisher_id VARCHAR2(4),

author_id VARCHAR2 (50));

The BOOK ID value 101 does not exist in the table.

Examine the SQL statement.

insert into books (book id title, author_id values

(‘101’,’LEARNING SQL’,’Tim Jones’)

Options:

A.

It executes successfully and the row is inserted with a null PLBLISHER_ID.

B.

It executes successfully only if NULL is explicitly specified in the INSERT statement.

C.

It executes successfully only NULL PUBLISHER_ID column name is added to the columns list in the INSERT statement.

D.

It executes successfully onlyif NULL PUBLISHER ID column name is added to the columns list and NULL is explicitly specified In the INSERT statement.

Buy Now
Questions 81

In which three situations does a new transaction always start?

Options:

A.

When issuing a SELECT FOR UPDATE statement after a CREATE TABLE AS SELECT statement was issued in the same session

B.

When issuing a CREATE INDEX statement after a CREATE TABLE statement completed unsuccessfully in the same session

C.

When issuing a TRUNCATE statement after a SELECT statement was issued in the same session

D.

When issuing a CREATE TABLE statement after a SELECT statement was issued in the same session

E.

When issuing the first Data Manipulation Language (OML) statement after a COMMIT or ROLLBACK statement was issued in the same session

F.

When issuing a DML statement after a DML statement filed in the same session.

Buy Now
Questions 82

Which two statements cause changes to the data dictionary?

Options:

A.

DELETE FROM scott. emp;

B.

GRANT UPDATE ON scott. emp TO fin manager;

C.

AITER SESSION set NLs. _DATE FORMAT = 'DD/MM/YYYY';

D.

TRUNCATE TABLE emp:

E.

SELECT * FROM user_ tab._ privs;

Buy Now
Questions 83

Which two are true about transactions in the Oracle Database?

Options:

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.

Buy Now
Questions 84

Which three statements are true about Data Manipulation Language (DML)?

Options:

A.

delete statements can remove multiple rows based on multiple conditions.

B.

insert statements can insert nulls explicitly into a column.

C.

insert into. . .select. . .from statements automatically commit.

D.

DML statements require a primary key be defined on a table.

E.

update statements can have different subqueries to specify the values for each updated column.

Buy Now
Questions 85

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

Buy Now
Questions 86

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

Buy Now
Questions 87

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

Buy Now
Questions 88

Which two are true about the MERGE statement?

Options:

A.

The WHEN NOT MATCHED clause can be used to specify the deletions to be performed.

B.

The WHEN NOT MATCHED clause can be used to specify the inserts to be performed.

C.

The WHEN MATCHED clause can be used to specify the inserts to be performed.

D.

The WHEN NOT MATCHED clause can be used to specify the updates to be performed.

E.

The WHEN MATCHED clause can be used to specify the updates to be performed.

Buy Now
Questions 89

Which statement is true about aggregate functions?

Options:

A.

The AVG function implicitly converts NULLS to zero

B.

The MAX and MIN functions can be used on columns with character data types

C.

Aggregate functions can be used in any clause of a SELECT statement

D.

Aggregate functions can be nested to any number of levels

Buy Now
Questions 90

Which three statements about roles are true?

Options:

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.

Buy Now
Questions 91

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.

Buy Now
Questions 92

Which two statements are true about substitution variables?

Options:

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.

Buy Now
Questions 93

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)

Buy Now
Questions 94

The ORDERS table has a primary key constraint on the ORDER_ID column.

The ORDER_ITEMS table has a foreign key constraint on the ORDER_ID column, referencing the primary key of the ORDERS table.

The constraint is defined with on DELETE CASCADE.

There are rows in the ORDERS table with an ORDER_TOTAL less than 1000.

Which three DELETE statements execute successfully?

Options:

A.

DELETE FROM orders WHERE order_total<1000;

B.

DELETE * FROM orders WHERE order_total<1000;

C.

DELETE orders WHERE order_total<1000;

D.

DELETE FROM orders;

E.

DELETE order_id FROM orders WHERE order_total<1000;

Buy Now
Questions 95

Whith three statements are true about built in data types?

Options:

A.

A VARCHAR2 blank pads column values only if the data stored is non numeric and contains no special characlers

B.

A BFILE stores unstructured binary data in operating systerm files

C.

A CHAR column definition does not require the length to be specified

D.

The default length for a CHAR column is always one character

E.

A VARCHAR2 column definition does not require the length to be specified

F.

A BLOB stores unstructured binary data within the database

Buy Now
Questions 96

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

Options:

A.

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

B.

REFERENCES can be grantrd only on tables.

C.

INSERT can be granted only on tables and sequences.

D.

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

E.

ALTER can be granted only on tables and sequences.

Buy Now
Questions 97

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

Buy Now
Exam Code: 1z0-071
Exam Name: Oracle Database 12c SQL
Last Update: Dec 3, 2024
Questions: 326

PDF + Testing Engine

$140

Testing Engine

$105

PDF (Q&A)

$90