Summer Sale - Special Discounts Limited Time 55% Discount Offer - Ends in 0d 00h 00m 00s - Coupon code: 63r59951

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

Questions 4

Choose the best answer.

Examine the description of the EMPLOYEES table:

1z0-071 Question 4

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;

Buy Now
Questions 5

Examine this incomplete query:

SELECT DATA’2019-01-01’+

FROM DUAL;

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

Options:

A.

INTERVAL ‘12:00’

B.

INTERVAL’0,5’DAY

C.

INTERVAL’12’ HOUR

D.

INTERVAL’720’MINUTE

E.

INTERVAL’0 12’DAY TO HOUR

F.

INTERVAL’11:60’HOUR TO MINUTE

Buy Now
Questions 6

Examine the data in the EMP table:

1z0-071 Question 6

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 7

Examine the description of the sales table.

The sales table has 55,000 rows.

Examine this statements:

Which two statements are true?

Options:

A.

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

B.

SALES1 created with 55, 000 rows

C.

SALES1 created with no rows.

D.

SALES1 created with 1 row.

E.

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

Buy Now
Questions 8

Examine this statement:

SELECT last name

FROM employees

ORDER BY CASE WHEN salary = (SELECT MAX(salary) FROM employees)

THEN ‘A’

ELSE last_ name

END ,last_name DESC;

Which two statements are true?

Options:

A.

The names of employees earning the maximum salary will appear first in descending order.

B.

The names of employees earning the maximum salary will appear first In ascending order.

C.

All remaining employee names will appear in ascending order.

D.

All remaining employee names will appear in an unspecified order.

E.

All remaining employee names will appear in descending order.

F.

The names of employees earning the maximum salary will appear first in an unspecified order.

Buy Now
Questions 9

Which two statements are true about CURRENT_TIMEITAMP?

Options:

A.

The date is in the time zone of DBTIMEZONE.

B.

The value varies depending on the setting of SESSIONTIMEZONE.

C.

It returns the same date as CURRENT_DATE.

D.

The time is in the time zone of DBTIMEZONE.

E.

It returns a value of data type TIMESTAMP

F.

It always returns the same value as SYSTIMESTAMP

Buy Now
Questions 10

Examine the description of the EMPLOYEES table:

1z0-071 Question 10

Which two statements will run successfully?

Options:

A.

SELECT 'The first_name is '' || first_name || '' FROM employees ;

B.

SELECT 'The first_name is '''||first_name ||'''' FROM employees ;

C.

SELECT 'The first_name is ''' ||first_name||''' FROM employees ;

D.

SELECT 'The first_name is '|| first_name|| '' FROM employees;

E.

SELECT 'The first_name is \'' || first_name || '\'' FROM employees;

Buy Now
Questions 11

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 12

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

Buy Now
Questions 13

Examine the description of the EMPLOYEES table:

1z0-071 Question 13

Examine this query:

1z0-071 Question 13

Which line produces an error?

Options:

A.

Line 7

B.

Line 8

C.

Line 3

D.

Line 5

Buy Now
Questions 14

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 15

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.

Buy Now
Questions 16

Which three statements are true about a self join?

Options:

A.

It must be an inner join.

B.

It must be an equijoin.

C.

The query must use two different aliases for the table.

D.

The on clause can be used.

E.

The on clause must be used.

F.

It can be an outer join.

Buy Now
Questions 17

Examine this partial query:

SELECT ch.channel_type, t.month, co.country_code, SUM(s.amount_sold) SALES

FROM sales s, times t, channels ch, countries co

WHERE s.time_ id = t.time id

AND s.country_ id = co. country id

AND s. channel id = ch.channel id

AND ch.channel type IN ('Direct Sales', 'Internet')

AND t.month IN ('2000-09', '2000-10')

AND co.country code IN ('GB', 'US')

Examine this output:

1z0-071 Question 17

Which GROUP BY clause must be added so the query returns the results shown?

Options:

A.

GROUP BY ch.channel_type, t.month, co.country code;

B.

GROUP BY ch.channel_type,ROLLUP (t month, co. country_ code) ;

C.

GROUP BY CUBE (ch. channel_ type, t .month, co. country code);

D.

GROUP BYch. channel_ type, t.month,ROLIUP (co. country_ code) ;

Buy Now
Questions 18

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
Questions 19

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 20

Which two are true about global temporary tables?

Options:

A.

They can be created only by a user with the DBA role,but can be accessed by all users who can create a session.

B.

Backup and recovery operations are available for these tables.

C.

If the ON COMMIT clause is session-specific,the table is dropped when the session is terminated.

D.

Their data is always stored in the default temporary tablespace of the user who created them.

E.

Indexes can be created on them.

F.

If the ON COMMIT clause Is transaction-specific, all rows in the table are deleted alter each COMMIT or ROLLBACK.

Buy Now
Questions 21

Which two statements will do an implicit conversion?

Options:

A.

SELECT * FROM customers WHERE customer_ id = 0001 ;

B.

SELECT * FROM customers WHERE customer id = ‘0001’;

C.

SELECT * FROM customers WHERE insert_ date = DATE ‘2019-01-01’;

D.

SELECT * FROM customers WHERE insert date =’01-JAN-19’

E.

SELECT * FROM customers WHERE TO_ CHAR (customer_ id) =’0001’;

Buy Now
Questions 22

Examine the description of the ENPLYEES table:

1z0-071 Question 22

Which two queries return all rows for employees whose salary is greater than the average salary in their department?

Options:

A.

SELECT ”

FROM employees

WHERE salary > ANY

SELECT AVG (salary)

EROM employees

GROUP BY department_ id);

B.

SELECT

FROM employees

WHERE salary > AVG (salary) OVER (PARTITION BY department _ id);

C.

SELECT”

FROM employees e1

WHERE salary >!

SELECT AVG (salary)

FROM employees e2

WHERE e1. Department _id = e2, department_ id

D.

SELECT.

FROM

SELECT e.", AVG (salary) OVER (PARTITION BY department id) avg_ sal

FROM employees e

WHERE salary > avg_ sal;

E.

SELECT”

FROM employees

WHERE salary >

( SELECT AVG

(salary) FROM

employees

GROUP BY department _ id

Buy Now
Questions 23

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 24

Which three statements are true regarding indexes?

Options:

A.

A SELECT statement can access one or more indices without accessing any tables.

B.

A table belonging to one user can have an index that belongs to a different user,

C.

When a table is dropped and is moved to the RECYCLE BIN, all Indexes built on that table are permanently dropped.

D.

A UNIQUE index can be altered to be non-unique.

E.

An update to a table can result in no updates to any of the table's indexes.

F.

An update to a table can result in updates to any or all of the table's indexes.

Buy Now
Questions 25

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

Options:

A.

SELECT last_ name, salary

FROM employees

FETCH FIRST 3 ROWS ONLY

ORDER BY salary;

B.

SELECT last name, salary

FROM employees

ORDER BY salary

FETCE FIRST 3 RONS ONLY;

C.

SELECT last_ name, salary

FBOM employees

WEERE

ORDER BY SELECT

ROINUM <= 3

salary FROM

employees);

D.

SELECT last_ name, salary

FROM

(SELECT” FROM employees ORDER BY salary)

WHERE ROWNUM <=3

E.

SELECT last_ name, salary

FROM employees

WHERE ROWNUM <=3

ORDER BY salary

Buy Now
Questions 26

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 27

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

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

Which WHERE clause can be used?

Options:

A.

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

B.

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

C.

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

D.

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

Buy Now
Questions 28

Examine these statements and results:

SQL> SELECT COUNT(*) FROM emp

COUNT(*)

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

14

sQL> CREATE GLOBAL TEMPORARY TABLE t emp As SELECT * FROM emp;

Table created

SQL> INSERT INTo temp SELECT * FROM emp;

14 rows created

SQL> COMMIT:

Commit complete*

SQL> INSERT INTo temp SELECT * EROM emp;

14. rows created

SQL> SELECT COUNT(*) FROM t emp

How many rows are retrieved by the last query?

Options:

A.

28

B.

0

C.

14

D.

42

Buy Now
Questions 29

Evaluate these commands which execute successfully CREATE SEQUENCE ord_seq

INCREMENT BY 1

START WITH 1

MAXVALUE 100000

CYCLE

CACHE 5000;

Create table ord_items(

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

Item_no number(3),

Qty number(3),

Expiry_date date,

Constraint it_pk primary key(ord_no,item_no),

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

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

Options:

A.

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

B.

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

C.

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

D.

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

E.

Sequence ORD_SEQ is guaranteed not to generate duplicate numbers.

Buy Now
Questions 30

Examine this statement:

1z0-071 Question 30

Which two things must be changed for it to execute successfully?

Options:

A.

The word CONSTRAINT in the foreign key constraint on DEPT_ID must be changed to FOREIGN KEY.

B.

The foreign key constraint on DEPT_ID must be defined at the table level instead of the column level.

C.

One of the LONG columns must be changed to a VARCHAR2 or CLOB.

D.

The NOT NULL constraint on ENAME must be defined at the column level instead of the table level.

E.

The primary key constraint on BMP_ID must have a name.

Buy Now
Questions 31

Examine the description of the ORDERS table:

1z0-071 Question 31

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 32

Which two are true about multiple table INSERT statements?

Options:

A.

They always use subqueries.

B.

They can transform a row from a source table into multiple rows in a target table.

C.

The conditional INSERT FIRST statement always inserts a row into a single table.

D.

The conditional INSERT ALL statement inserts rows into a single table by aggregating source rows.

E.

The unconditional INSERT ALL statement must have the same number of columns in both the source and target tables.

Buy Now
Questions 33

Which statement will execute successfully?

Options:

A.

SELECT 1, 2 FROM DUAL

UNION

SELECT 3, 4 FROM DUAL

ORDER BY 1, 2;

B.

SELECT 3 FROM DUAL

UNION

SELECT 4 FROM DUAL

ORDER BY 3 ;

C.

SELECT 1, 2 FROM DUAL

UNION

SELECT 3, 4 FROM DUAL

ORDER BY 3, 4;

D.

SELECT 1 FROM DUAL

UNION

SELECT 2 FROM DUAL

ORDER BY 1, 2;

Buy Now
Questions 34

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 35

1z0-071 Question 35

For each employee in department 90 you want to display:

1. their last name

2. the number of complete weeks they have been employed

The output must be sorted by the number of weeks, starting with the longest serving employee

first.Which statement will accomplish this?

Options:

A.

SELECT last_name, TRUNC( (SYSDATE - hire_ date) 1 7) AS tenure

FROM employees

WHERE department_ id = 90

ORDER BY tenure ;

B.

SELECT last_name, ROUND( (SYSDATE - hire_ date) 1 7) AS tenure

FROM employees

WHERE department_ id = 90

ORDER BY tenure ;

C.

SELECT last_name, ROUND( (SYSDATE - hire_ date) 17) AS tenure

FROM employees

WHERE department_ id = 90

ORDER BY tenure DESC;

D.

SELECT last_name, TRUNC ( (SYSDATE - - hire_ date) 1 7) AS tenure

FROM employees

WHERE department_id = 90

ORDER BY tenure DESC;

Buy Now
Questions 36

Examine the description of the PRODUCT_STATUS table:

1z0-071 Question 36

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 "CURRENT AVAILABILITY" || q'('s not available)' 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)’ "CURRENT AVAILABILITY" FROM product_status WHERE status = 'OUT OF STOCK';

D.

SELECT prod_id || q'('s not available)' FROM product_status WHERE status = ’OUT OF STOCK’;

E.

SELECT prod_id || q’(’s not available)' 'CURRENT AVAILABILITY' FROM product_status WHERE status = 'OUT OF STOCK';

F.

SELECT prod_id || q"'s not available" FROM product_status WHERE status = 'OUT OF STOCK';

Buy Now
Questions 37

Examine the description of the CUSTOMERS table:

1z0-071 Question 37

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 38

Examine this SQL statement:

SELECT cust_id, cus_last_name "Last Name"

FROM customers

WHERE country_id = 10

UNION

SELECT cust_id CUST_NO, cust_last_name

FROM customers

WHERE country_id = 30

Identify three ORDER BY clauses, any one of which can complete the query successfully.

Options:

A.

ORDERBY 2, 1

B.

ORDER BY "CUST_NO"

C.

ORDER BY 2,cust_id

D.

ORDER BY CUST_NO

E.

ORDER BY "Last Name"

Buy Now
Questions 39

The SALES table has columns PROD_ID and QUANTITY_SOLD of data type NUMBER. Which two queries execute successfully?

Options:

A.

SELECT COUNT(prod_id) FROM sales WHERE quantity_sold>55000 GROUP BY prod_id;

B.

SELECT prod_id FROM sales WHERE quantity_sold> 55000 GROUP BY prod_id HAVING COUNT(*)> 10;

C.

SELECT COUNT(prod_id) FROM sales GROUP BY prod_id WHERE quantity_sold> 55000;

D.

SELECT prod_id FROM sales WHERE quantity_sold> 55000 AND COUNT(*)> 10 GROUP BY COUNT(*)> 10;

E.

SELECT prod_id FROM sales WHERE quantity_sold> 55000 AND COUNT(*)> 10 GROUP BY prod_id HAVING COUNT(*)> 10;

Buy Now
Questions 40

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 41

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

Buy Now
Questions 42

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

One of the columns must meet three requirements:

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

2: Store a loan period of up to 10 years

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

Options:

A.

TIMESTAMP WITH TIMEZONE

B.

TIMESTAMP

C.

TIMESTAMP WITH LOCAL TIMEZONE

D.

INTERVAL YEAR TO MONTH

E.

INTERVAL DAY TO SECOND

Buy Now
Questions 43

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

Buy Now
Questions 44

What is true about non-equijoin statement performance?

Options:

A.

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

B.

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

C.

The join syntax used makes no difference to performance.

D.

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

E.

Table aliases can improve performance.

Buy Now
Questions 45

You execute these commands:

CREATE TABLE customers (customer id INTEGER, customer name VARCHAR2 (20));

INSERT INTO customers VALUES (1,‘Custmoer1 ‘);

SAVEPOINT post insert;

INSERT INTO customers VALUES (2, ’Customer2 ‘);

SELECTCOUNT (*) FROM customers;

Which two, used independently, can replace so the query retums 1?

Options:

A.

ROLLBACK;

B.

COMMIT;

C.

ROLIBACK TO SAVEPOINT post_ insert;

D.

CONOIT TO SAVEPOINT post_ insert;

E.

ROLLEBACK TO post_ insert;

Buy Now
Questions 46

Which two statements are true about an Oracle database?

Options:

A.

A table can have multiple primary keys.

B.

A table can have multiple foreign keys.

C.

A NUMBER column without data has a zero value.

D.

A column definition can specify multiple data types.

E.

A VARCHAR2 column without data has a NULL value.

Buy Now
Questions 47

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

Buy Now
Questions 48

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 49

Which three statements are true regarding single row subqueries?

Options:

A.

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

B.

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

C.

A SQL statement may have multiple single row subquery blocks.

D.

They can be used in the HAVING clause.

E.

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

F.

They can be used in the clause.

Buy Now
Questions 50

Examine the description of the EMPLOYEES table:

1z0-071 Question 50

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

ENT_ID?

Options:

A.

UPDATE employees e1

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

FROM employees e2

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

B.

UPDATE employees e1

SET salary = salary +

(SELECT MIN(e1. salary)

FROM employees e2

WHERE e1.department_id = e2 .department_id);

C.

UPDATE employees e1

SET salary = salary+(SELECT MIN (salary)

FROM employees e2) ;

D.

UPDATE employees e1

SET salary=

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

FROM employees e2

WHERE e1. department_ id = e2.department_id);

Buy Now
Questions 51

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 clause.

C.

In a character sort, the values are case-sensitive.

D.

Column aliases can be used in the ORDER BY clause.

E.

NULLS are not included in the sort operation.

Buy Now
Questions 52

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 53

Examine this SQL statement:

1z0-071 Question 53

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 54

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.

Buy Now
Questions 55

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

Buy Now
Questions 56

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 57

Examine the description of the PRODUCT_INFORMATION table:

1z0-071 Question 57

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 58

Examine this description of the PRODUCTS table:

You successfully execute this command:

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

Which two statements execute without errors?

Options:

A.

MERGE INTO new_prices n

USING(SELECT*FROM products)p

WHEN MATECHED THEN

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

WHEN NOT MATCHED THEN

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

WHERE(p.cost<200);

B.

MERGE INTO new_prices n

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

ON (n.prod_id=p.prod_id)

WHEN NATCHED THEN

DELETE WHERE(p.cost<200)

WHEN NOT MATCHED THEN

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

C.

MERGE INTO new_prices n

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

ON (n.prod_id=p.prod_id)

WHEN NATCHED THEN

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

DELETE WHERE (p.cost<200);

D.

MERGE INTO new_prices n

USING products p

WHEN NOT NATCHED THEN

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

WHERE (p.cost <200);

Buy Now
Questions 59

Which is true about the & and && prefixes with substitution variables?

Options:

A.

& can prefix a substitution variable name only in queries. DML

B.

An & prefix to an undefined substitution variable, which is referenced twice in the same query, will prompt for a value twice .

C.

The && prefix will not prompt for a value even if the substitution variable is not previously defined in the session.

D.

An && prefix to an undefined substitution variable, which is referenced multiple times in multiple queries, will prompt for a value once per query.

E.

Both & and && can prefix a substitution variable name in queries and DML statements.

Buy Now
Questions 60

Examine the description of the BOOKS table:

1z0-071 Question 60

The table has 100 rows.

Examine this sequence of statements issued in a new session;

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

SAVEPOINT a;

DELETE from books;

ROLLBACK TO SAVEPOINT a;

ROLLBACK;

Which two statements are true?

Options:

A.

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

B.

The second ROLLBACK command does nothing.

C.

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

D.

The second ROLLBACK command replays the delete.

E.

The second ROLLBACK command undoes the insert.

Buy Now
Questions 61

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

Buy Now
Questions 62

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 63

Examine the data in the COLORS table:

1z0-071 Question 63

Examine the data in the BRICKS table:

1z0-071 Question 63

Which two queries return all the rows from COLORS?

Options:

A.

SELECT.

FROM bricks b

RIGHT JOIN colors c

ON b. color _rgb_ hex_ value = c. rgb hex_ value;

B.

SELECT

EROM colors C

LEFT JOIN bricks 上

USING (rgb _ hex_ value) ;

C.

SELECT

FROM bricks b

FULL JOIN colors C

ON b. color rgb _ hex_ value = c. rgb _hex_ value;

D.

SELECT *

EROM bricks | b

JOIN colors C

ON b. color_ rgb_ hex_ value =c. rgb _hex value;

E.

SELECT

EROM colors C

LEET JOIN bricks b

ON b. color_ rgb_ hex value = c. rgb. hex.

value

WHERE b. brick_ id > 0;

Buy Now
Questions 64

Which two statements are true about selecting related rows from two tables based on entity relationship diagram (ERD)?

Options:

A.

Relating data from a table with data from the same table is implemented with a self join.

B.

An inner join relates rows within the same table.

C.

Rows from unrelated tables cannot be joined.

D.

Implementing a relationship between two tables might require joining additional tables.

E.

Every relationship between the two tables must be implemented in a Join condition.

Buy Now
Questions 65

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 UPPER(SUBSTR(cust_name, INSTR(cust_name,’ ’) + 1)) LIKE UPPER('MC%')

B.

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

C.

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

D.

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

E.

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

Buy Now
Questions 66

Examine thee statements which execute successfully:

CREATE USER finance IDENTIFIED BY pwfin;

CREATE USER fin manager IDENTIETED BY pwmgr;

CREATE USER fin. Clerk IDENTIFIED BY pwclerk;

GRANT CREATE SESSON 20 finance, fin clerk;

GRANT SELECT ON scott. Emp To finance WITH GRANT OPTION;

CONNECT finance/pwfin

GRANT SELECT ON scott. emp To fin_ _clerk;

Which two are true?

Options:

A.

Dropping user FINANCE will automatically revoke SELECT on SCOTT. EMP from user FIN _ CLERK

B.

Revoking SELECT on SCOTT. EMP from user FINANCE will also revoke the privilege from user FIN_ CLERK.

C.

User FINANCE can grant CREATE SESSION to user FIN MANAGER.

D.

User FIN CLERK can grant SELECT on SCORT, ENP to user FIN MANAGER.

E.

User FINANCE is unable to grant ALL on SCOTT.ENP to FIN MANAGER.

Buy Now
Questions 67

Examine the description of the CUSTONERS table

1z0-071 Question 67

CUSTON is the PRIMARY KEY.

You must derermine if any customers’derails have entered more than once using a different

costno,by listing duplicate name

Which two methode can you use to get the requlred resuit?

Options:

A.

RIGHT OUTER JOIN with seif join

B.

FULL OUTER JOIN with seif join

C.

SUBQUERY

D.

seif join

E.

LEFT OUTER JOIN with seif join

Buy Now
Questions 68

Which three statements are true about inner and outer joins?

Options:

A.

A full outer join returns matched and unmatched rows.

B.

A full outer join must use Oracle syntax.

C.

Outer joins can be used when there are multiple join conditions on two tables.

D.

Outer joins can only be used between two tables per query.

E.

An inner join returns matched rows.

F.

A left or right outer join returns only unmatched rows.

Buy Now
Questions 69

Which two queries execute successfully?

Options:

A.

SELECT INTERVAL '1' DAY - SYSDATE FROM DUAL;

B.

SELECT SYSTIMESTAMP + INTERVAL '1' DAY FROM DUAL;

C.

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

D.

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

E.

SELECT SYSDATE “INTERRVAL '1' DAY FROM DUAL;

Buy Now
Questions 70

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.

Buy Now
Questions 71

Which two statements are true about the DUAL table?

Options:

A.

It can display multiple rows and columns.

B.

It can be accessed only by the SYS user.

C.

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

D.

It can display multiple rows but only a single column.

E.

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

F.

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

Buy Now
Questions 72

Examine the description of the BRICKS table;

1z0-071 Question 72

Examine the description of the BRICKS_STAGE table;

1z0-071 Question 72

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;

Buy Now
Questions 73

Which two statements are true about external tables?

Options:

A.

Indexes can be created on them.

B.

You can populate them from existing data in the database by using the CREATE TABLE AS SELECT command.

C.

DML statements cannot be used on them.

D.

Their data can be retrieved by using only SQL or PL/SQL.

E.

Their metadata and actual data are both stored outside the database.

Buy Now
Questions 74

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 75

Examine this query:

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

Which statement is true?

Options:

A.

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

B.

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

C.

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

D.

It executes successfully with an implicit data type conversion

Buy Now
Questions 76

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 77

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

Buy Now
Questions 78

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

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

Which two queries give the required output?

Options:

A.

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

B.

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

C.

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

D.

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

E.

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

Buy Now
Questions 79

Examine the data in the COLORS table:

1z0-071 Question 79

Examine the data in the BRICKS table:

1z0-071 Question 79

Which two queries return all the rows from COLORS?

Options:

A.

1z0-071 Question 79 Option 1

B.

79

C.

79

D.

79

E.

79

Buy Now
Questions 80

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;

Buy Now
Questions 81

Examine this business rule:

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

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

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

Options:

A.

An associative table must be created with a composite key of STUDENT_ID and PROJECT_ID, which is the foreign key linked to the STUDENTS and PROJECTS entities.

B.

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

C.

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

D.

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

E.

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

Buy Now
Questions 82

1z0-071 Question 82

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 83

Examine this data in the EMPLOYERS table:

1z0-071 Question 83

Which statement will execute successfully?

Options:

A.

SELECT dept_id, MAX (Last_name), SUM (salary) FROM employees GROUP BY dept_id

B.

SELECT dept_id, LENGTH (last_name), SUM (salary) FROM employees GROUP BY dept_id

C.

SELECT dept_id, STDDEV (last_name), SUM (salary) FROM employees GROUP BY dept_id

D.

SELECT dept_id, INSTR (last_name,'A'), SUM (salary) FROM employees GROUP BY dept_id

Buy Now
Questions 84

Which three are true aboutprivileges and roles?

Options:

A.

System prilgese always set prilge for an entire database.

B.

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

C.

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

D.

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

E.

A role is owned by the user who created it.

F.

All roles are owned by the sYs schema.

G.

PUBIIC can be revoked from a user.

Buy Now
Questions 85

Which two statements are true about a full outer join?

Options:

A.

It includes rows that are returned by an inner join.

B.

The Oracle join operator (+) must be used on both sides of the join condition in the WHERE clause.

C.

It includes rows that are returned by a Cartesian product.

D.

It returns matched and unmatched rows from both tables being joined.

E.

It returns only unmatched rows from both tables being joined.

Buy Now
Questions 86

Examine the description of the EMPLOYEES table:

1z0-071 Question 86

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 87

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;

Buy Now
Questions 88

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 89

Which two statements are true about views?

Options:

A.

Views can be indexed.

B.

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

C.

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

D.

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

E.

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

Buy Now
Questions 90

Which three statements are true about sequences in a single instance Oracle database?

Options:

A.

A sequence's unallocated cached values are lost if the instance shuts down.

B.

Two or more tables cannot have keys generated from the same sequence.

C.

A sequence number that was allocated can be rolled back if a transaction fails.

D.

A sequence can issue duplicate values.

E.

Sequences can always have gaps.

F.

A sequence can only be dropped by a DBA.

Buy Now
Questions 91

The EMPLOYEES table contains columns EMP_ID of data type NUMBER and HIRE_DATE of data type DATE

You want to display the date of the first Monday after the completion of six months since hiring.

The NLS_TERRITORY parameter is set to AMERICA in the session and, therefore, Sunday is the first day of the week Which query can be used?

Options:

A.

SELECT emp_id,NEXT_DAY(ADD_MONTHS(hite_date,6),'MONDAY') FROM employees;

B.

SELECT emp_id,ADD_MONTHS(hire_date,6), NEXT_DAY('MONDAY') FROM employees;

C.

SELECT emp_id,NEXT_DAY(MONTHS_BETWEEN(hire_date,SYSDATE),6) FROM employees;

D.

SELECT emp_id,NEXT_DAY(ADD_MONTHS(hire_date,6),1) FROM employees;

Buy Now
Questions 92

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.

Buy Now
Questions 93

Examine the description of the EMPLOYEES table:

1z0-071 Question 93

NLS_DATE FORMAT is DD-MON-RR.

Which two queries will execute successfully?

Options:

A.

SELECT dept_ id, AVG (MAX(salary)) FROM employees GROUP By dept_id HAVING hire_date> ' O1-JAN-19';

B.

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

C.

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

D.

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

E.

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

Buy Now
Questions 94

Examine the description of the PRODUCTS table:

1z0-071 Question 94

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 95

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 96

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
Exam Code: 1z0-071
Exam Name: Oracle Database 12c SQL
Last Update: Apr 17, 2024
Questions: 321

PDF + Testing Engine

$74.7  $165.99

Testing Engine

$51.75  $114.99
buy now 1z0-071 testing engine

PDF (Q&A)

$47.25  $104.99
buy now 1z0-071 pdf