Labour Day - Special 70% Discount Offer - Ends in 0d 00h 00m 00s - Coupon code: 70dumps

1z0-071 Questions and Answers

Question # 6

Examine this query which executes successfully;

Select job,deptno from emp

Union all

Select job,deptno from jobs_history;

What will be the result?

A.

It will return rows from both select statements after eliminating duplicate rows.

B.

It will return rows common to both select statements.

C.

It will return rows both select statements including duplicate rows.

D.

It will return rows that are not common to both select statements.

Full Access
Question # 7

Examine the description of the EMPLOYEES table:

NLS_DATE FORMAT is DD-MON-RR.

Which two queries will execute successfully?

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;

Full Access
Question # 8

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?

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

Full Access
Question # 9

Examine the description of the CUSTOMERS table:

Which three statements will do an implicit conversion?

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

Full Access
Question # 10

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

A.

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

B.

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

C.

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

D.

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

E.

The FOR UPDATE clause cannot be specified.

Full Access
Question # 11

Which two statements are true about transactions in the Oracle Database server?

A.

An uncommitted transaction commits automatically if the user exits SQL*Plus

B.

Data Manipulation Language (DML) statements always start a new transaction.

C.

A user can always see uncommitted updates made by the same user in a different session.

D.

A Data Definition Language (DDL) statement does a commit automatically only for the data dictionary updates caused by the DDL

E.

A session can always see uncommitted updates made by itself.

F.

If a session has an uncommitted transaction, then a DDL statement issue a COMMIT before starting a new transaction.

Full Access
Question # 12

You execute these commands successfully:

CREATE GLOBAL TEMPORARY TABLE invoices _ gtt

( customer id INTEGER,

invoice_ total NUMBER (10, 2)

) ON COMMIT PRESERVE ROWS;

INSERT INTO invoices_ gtt VALUES (1, 100);

COMMIT;

Which two are true?

A.

You can add a foreign key to the table.

B.

When you terminate your session, the row will be deleted.

C.

To drop the table in this session, you must first truncate it.

D.

You can add a column to the table in this session.

E.

Other sessions can view the committed row.

Full Access
Question # 13

Which three statements are true about dropping and unused columns in an Oracle database?

A.

A primary key column referenced by another column as a foreign key can be dropped if using the CASCADE option.

B.

A DROP COLUMN command can be rolled back.

C.

An UNUSED column's space is remained automatically when the block containing that column is next queried.

D.

An UNUSED column's space is remained automatically when the row containing that column is next queried.

E.

Partition key columns cannot be dropped.

F.

A column that is set to NNUSED still counts towards the limit of 1000 columns per table.

Full Access
Question # 14

Which two statements are true about single row functions?

A.

CONCAT: can be used to combine any number of values

B.

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

C.

CEIL: can be used for positive and negative numbers

D.

TRUNC: can be used with NUMBER and DATE values

E.

MOD: returns the quotient of a division operation

Full Access
Question # 15

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?

A.

1

B.

16

C.

10

D.

6

E.

4

F.

0

Full Access
Question # 16

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?

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

Full Access
Question # 17

Which two statements will convert the string Hello world to ello wozid?

A.

SELECT LOWER (SUBSTR(‘Hello World, 2, 1)) FROM DUAL;

B.

SELECT LOWER (SUBSTR(‘Hello World’, 2)) FROM DUAL;

C.

SELECT LOWER(TRIM(‘H’ FROM ‘Hello World’)) FROM DUAL;

D.

SELECT SUBSTR(‘Hello world’, 2) FROM DUAL;

E.

SELECT INITCAP(TRIM(‘H’ FROM ‘Hello World’)) FROM DUAL;

Full Access
Question # 18

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

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.

Full Access
Question # 19

Which two actions can you perform with object privileges?

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.

Full Access
Question # 20

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

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

A.

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

B.

qty_sold ='05549821 ': requires explicit conversion

C.

CONCAT(qty_sold, invoice_date): requires explicit conversion

D.

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

E.

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

Full Access
Question # 21

Which two are true about the USING clause when joining tables?

A.

All column names in a USING clause must be qualified with a table name or table alias.

B.

It can never be used with onatural join.

C.

It is used to specify an equijoin of columns that have the same name in both tables.

D.

It can never be used with a full outer join.

E.

It is used to specify an explicit join condition involving operators.

Full Access
Question # 22

Which three are true about multiple INSERT statements?

A.

They can be performed only by using a subquery.

B.

They can be performed on relational tables.

C.

They can be performed on views.

D.

They can be performed on remote tables.

E.

They can be performed on external tables using SQL*Loader.

F.

They can insert each computed row into more than one table.

Full Access
Question # 23

Examine these two queries and their output:

SELECT deptno, dname FROM dept;

SELECT ename, job, deptno FROM emp ORDER BY deptno;

Now examine this query:

SELECT ename, dname

FROM emp CROSS JOIN dept WHERE job = 'MANAGER'

AND dept.deptno IN (10, 20) ;

A.

64

B.

6

C.

3

D.

12

Full Access
Question # 24

Which two statements about INVISIBLE indexes are true?

A.

an INVISIBLE Index consumes no storage

B.

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

C.

The query optimizer never considers INVISIBLE Indexes when determining execution plans

D.

You use AlTER INDEX to make an INVISIBLE Index VISIBLE

E.

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

Full Access
Question # 25

Examine this incomplete query:

SELECT DATA’2019-01-01’+

FROM DUAL;

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

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

Full Access
Question # 26

Which two statements are true about date/time functions in a session where NLS_DATE_PORMAT is set to DD-MON-YYYY SH24:MI:SS

A.

SYSDATE can be used in expressions only if the default date format is DD-MON-RR.

B.

CURRENT_TIMESTAMP returns the same date as CURRENT_DATE.

C.

CURRENT_DATE returns the current date and time as per the session time zone

D.

SYSDATE and CURRENT_DATE return the current date and time set for the operating system of the database server.

E.

CURRENT_TIMESTAMP returns the same date and time as SYSDATE with additional details of functional seconds.

F.

SYSDATE can be queried only from the DUAL table.

Full Access
Question # 27

Examine the data in the ENPLOYEES table:

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

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

Full Access
Question # 28

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?

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

Full Access
Question # 29

Which two statements cause changes to the data dictionary?

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;

Full Access
Question # 30

Which three statements are true?

A.

The COMMISSION column can contain negative values .

B.

The MANAGER column is a foreign key referencing the EMPNO column.

C.

The SALARY column must have a value .

D.

An index is created automatically in the MANAGER column.

E.

The DEPTNO column in the EMP table can contain the value 1.

F.

The DEPTNO column in the EMP table can contain NULLS .

G.

The DNAME column has a unique constraint.

Full Access
Question # 31

Which statement fails to execute successfully?

A)

B)

C)

D)

A.

Option A

B.

Option B

C.

Option C

D.

Option D

Full Access
Question # 32

Evaluate these commands which execute successfully CREATE SEQUENCE ord_seq

INCREMENT BY 1

START WITH 1

MAXVALUE 100000

CYCLE

CACHE 5000;

Create table ord_items(

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

Item_no number(3),

Qty number(3),

Expiry_date date,

Constraint it_pk primary key(ord_no,item_no),

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

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

A.

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

B.

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

C.

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

D.

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

E.

Sequence ORD_SEQ is guaranteed not to generate duplicate numbers.

Full Access
Question # 33

You execute this command:

TRUNCATE TABIE depts;

Which two are true?

A.

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

B.

It drops any triggers defined on the table.

C.

It retains the indexes defined on the table.

D.

It retains the integrity constraints defined on the table,

E.

It always retains the space used by the removed rows.

F.

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

Full Access
Question # 34

The SYSDATE function displays the current Oracle Server date as:

21 -MAY-19

You wish to display the date as:

MONDAY, 21 MAY, 201 9

Which statement will do this?

A.

SELECT TO _ CHAR (SYSDATE, ' FMDAY, DD MONTH, YYYY') FROM DUAL;

B.

SELECT TO _ DATE (SYSDATE, ' FMDAY, DD MONTH, YYYY') FROM DUAL;

C.

SELECT TO_ CHAR (SYSDATE, ' FMDD, DAY MONTH, YYYY') FROM DUAL;

D.

SELECT TO_ CHAR (SYSDATE, ' FMDAY, DDTH MONTH, YYYY') FROM DUAL;

Full Access
Question # 35

Which three statements are true about inner and outer joins?

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.

Full Access
Question # 36

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

You only want to display details of rows where START_DATEis within the last 25 months.which WHERE clause can be used?

A.

WHERE TO_NUMBER(start_date - SYSDATE)<=25

B.

WHERE ADD_MONTHS (start date , 25)<= SYSDATE

C.

WHERE MONTHS_BETWEEN(SYSDATE, start_date)<=25

D.

WHERE MONTHS_BETWEEN (start_date, SYSDATE)<=25

Full Access
Question # 37

Which three are true about scalar subquery expressions?

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.

Full Access
Question # 38

Examine this statement:

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

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.

Full Access
Question # 39

Which two statements execute successfully?

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

Full Access
Question # 40

You execute this command:

TRUNCATE TABLE depts;

Which two are true?

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

Full Access
Question # 41

Which two are true about unused columns?

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

Full Access
Question # 42

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

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.

Full Access
Question # 43

What is true about non-equijoin statement performance?

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.

Full Access
Question # 44

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:

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

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

Full Access
Question # 45

Which two statements are true about substitution variables?

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.

Full Access
Question # 46

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

A.

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

B.

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

C.

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

D.

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

E.

INTERSECT ignores NULLs

Full Access
Question # 47

Examine the data in the COLORS table:

Examine the data in the BRICKS table:

Which two queries return all the rows from COLORS?

A.

B.

C.

D.

E.

Full Access
Question # 48

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?

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.

Full Access
Question # 49

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?

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

Full Access
Question # 50

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?

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

Full Access
Question # 51

You issued this command: DROP TABLE hr. employees;

Which three statements are true?

A.

ALL constraints defined on HR, EMPLOYEES are dropped.

B.

The HR. EMPLOYEES table may be moved to the recycle bin.

C.

Synonyms for HR EMPLOYEES are dropped.

D.

Sequences used to populate columns in the HR. EMPLOYEES table are dropped.

E.

All indexes defined on HR, EMPLOYEES are dropped.

F.

Views referencing HR, EMPLOYEES are dropped.

Full Access
Question # 52

Which two statements are true about truncate and delete?

A.

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

B.

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

C.

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

D.

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

E.

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

Full Access
Question # 53

Examine the description of the EMPLOYEES table:

Which two queries return rows for employees whose manager works in a different department?

A.

SELECT emp. *

FROM employees emp

WHERE manager_ id NOT IN (

SELECT mgr.employee_ id

FROM employees mgr

WHERE emp. department_ id < > mgr.department_ id

);

B.

SELECT emp.*

FROM employees emp

WHERE NOT EXISTS (

SELECT NULL

FROM employees mgr

WHERE emp.manager id = mgr.employee_ id

AND emp.department_id<>mgr.department_id

);

C.

SELECT emp.*

FROM employees emp

LEFT JOIN employees mgr

ON emp.manager_ id = mgr.employee_ id

AND emp. department id < > mgr. department_ id;

D.

SELECT emp. *

FROM employees emp

RIGHT JOIN employees mgr

ON emp.manager_ id = mgr. employee id

AND emp. department id <> mgr.department_ id

WHERE emp. employee_ id IS NOT NULL;

E.

SELECT emp. *

FROM employees emp

JOIN employees mgr

ON emp. manager_ id = mgr. employee_ id

AND emp. department_ id<> mgr.department_ id;

Full Access
Question # 54

Evaluate the following SQL statement

SQL>SELECT promo_id, prom _category FROM promotions

WHERE promo_category=’Internet’ ORDER BY promo_id

UNION

SELECT promo_id, promo_category FROM Pomotions

WHERE promo_category = ‘TV’

UNION

SELECT promoid, promocategory FROM promotions WHERE promo category=’Radio’

Which statement is true regarding the outcome of the above query?

A.

It executes successfully and displays rows in the descend ignore of PROMO CATEGORY.

B.

It produces an error because positional, notation cannot be used in the ORDER BY clause with SBT operators.

C.

It executes successfully but ignores the ORDER BY clause because it is not located at the end of the compound statement.

D.

It produces an error because the ORDER BY clause should appear only at the end of a compound query-that is, with the last SELECT statement.

Full Access
Question # 55

Examine the description of the PRODUCTS table:

Which three queries use valid expressions?

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;

Full Access
Question # 56

Examine the description of the EMPLOYEES table:

Which query is valid?

A.

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

B.

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

C.

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

D.

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

Full Access
Question # 57

Which three statements are true about single-row functions?

A.

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

B.

They can be nested to any level.

C.

They return a single result row per table.

D.

They can accept only one argument.

E.

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

F.

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

Full Access
Question # 58

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

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.

Full Access
Question # 59

Which two are true about the data dictionary?

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.

Full Access
Question # 60

Which two are true about the MERGE statement?

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.

Full Access
Question # 61

Which two are true about self joins?

A.

They are always equijoins.

B.

They require the NOT EXISTS operator in the join condition.

C.

They have no join condition.

D.

They can use INNER JOIN and LEFT JOIN.

E.

They require table aliases.

F.

They require the EXISTS opnrator in the join condition.

Full Access
Question # 62

Examine the description of the EMPLOYEES table:

Which statement will fail?

A.

SELECT department_id, COUNT (*)

FROM employees

HAVING department_ id <> 90 AND COUNT(*) >= 3

GROUP BY department_id;

B.

SELECT department_id, COUNT (*)

FROM employees

WHERE department_ id <> 90 AND COUNT(*) >= 3

GROUP BY department_id;

C.

SELECT department_id, COUNT(*)

FROM employees

WHERE department_id <> 90 HAVING COUNT(*) >= 3

GROUP BY department_id;

D.

SELECT department_id, COUNT(*)

FROM employees

WHERE department_id <> 90 GROUP BY department_id

HAVING COUNT(*) >= 3;

Full Access
Question # 63

Examine this query:

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

A.

16

B.

160

C.

150

D.

200

E.

100

Full Access
Question # 64

Which two statements are true about a self join?

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.

Full Access
Question # 65

Examine the description of the SALES1 table:

SALES2 is a table with the same description as SALES1,

Some sales data is duplicated In both tables.

You want to display the rows from the SALES1 table which are not present in the SALIES2 table.

Which set operator generates the required output?

A.

SUBTRACT

B.

INTERSECT

C.

UNION ALL

D.

MINUS

E.

UNION

Full Access
Question # 66

Examine the ORDER _ITEms table:

Which two queries return rows where QUANTITY is a multiple of ten?

A.

SELECT * FROM order_ items WHERE quantity = TRUNC (quantity, -1);

B.

SELECT * FROM order_ items WHERE MOD (quantity, 10) = 0;

C.

SELECT” FROM order_ items WHERE FLOOR (quantity / 10) = TRUNC (quantity / 10);

D.

SELECT FROM order_ items WHERE quantity / 10 = TRUNC (quantity);

E.

SELECT” FROM order_ _items WHERE quantity = ROUND (quantity, 1);

Full Access
Question # 67

Which three statements are true about time zones, date data types, and timestamp data types in an Oracle database?

A.

The DBTIMEZONE function can return an offset from Universal Coordinated Time (UTC)

B.

A TIMESTAMP WITH LOCAL TIMEZONE data type column is stored in the database using the time zone of the session that inserted the row

C.

A TIMESTAMP data type column contains information about year, month, and day

D.

The SESSIONTIMEZONE function can return an offset from Universal Coordinated Time (UTC)

E.

The CURRENT_TIMESTAMP function returns data without time zone information

Full Access
Question # 68

Which two statements are true about views?

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.

Full Access
Question # 69

Which statement falls to execute successfully?

A.

SELECT *

FROM employees e

JOIN department d

WHERE e.department_id=d.department_id

AND d.department_id=90;

B.

SELECT *

FROM employees e

JOIN departments d

ON e.department_id=d.department_id

WHERE d.department_id=90;

C.

SELECT *

FROM employees e

JOIN departments d

ON e.department_id=d.department_id

AND d.department_id=90;

D.

SELECT *

FROM employees e

JOIN departments d

ON d.departments_id=90

WHERE e.department_id=d.department_id;

Full Access
Question # 70

Which two tasks require subqueries?

A.

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

B.

Display suppliers whose PROD_LIST_PRICE is less than 1000.

C.

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

D.

Display the minimum PROD_LIST_PRICE for each product status.

E.

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

Full Access
Question # 71

Examine this business rule:

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

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

Which two statements are true?

A.

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

B.

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

C.

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

D.

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

E.

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

Full Access
Question # 72

Examine these statements which execute successfully:

Both statements display departments ordered by their average salaries.

Which two are true?

A.

Only the second statement will display departments with no employees.

B.

Only the first statement will display departments with no employees.

C.

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

D.

Both statements will display departments with no employees.

E.

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

F.

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

Full Access
Question # 73

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

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.

Full Access
Question # 74

The ORDERS table has a column ORDER_DATE of date type DATE The default display format for a date is DD-MON-RR

Which two WHERE conditions demonstrate the correct usage of conversion functions?

A.

WHERE ordet_date> TO_CHAR(ADD_MONTHS(SYSDATE, 6),'MON DD YYYY')

B.

WHERE TO_CHAR(order_date,'MON DD YYYY') ='JAN 20 2019';

C.

WHERE order_date> TO_DATE('JUL 10 2018','MON DD YYYY');

D.

WHERE order_date IN (TO_DATE ('Oct 21 2018','MON DD YYYY'), TO_CHAR('Nov 21 2018','MON DD YYYY'));

E.

WHERE order_date> TO_DATE(ADD_MONTHS(SYSDATE,6),'MON DD YYYY');

Full Access
Question # 75

Which two statements are true about single row functions?

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

Full Access
Question # 76

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

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.

Full Access
Question # 77

Which three statements are true about the DESCRIBE command?

A.

It can be used from SQL Developer.

B.

It can be used to display the structure of an existing view.

C.

It can be used only from SQL*Plus.

D.

It displays the NOT NULL constraint for any columns that have that constraint.

E.

It displays all constraints that are defined for each column.

F.

It displays the PRIMARY KEY constraint for any column or columns that have that constraint.

Full Access
Question # 78

Which two statements are true about * _ TABLES views?

A.

You must have SELECT privileges on a table to view it in ALL _TABLES.

B.

You must have SELECT privileges on a table to view it in DBA TABLES.

C.

USER_ TABLES displays all tables owned by the current user.

D.

ALL TABLES displays all tables owned by the current user.

E.

You must have SELECT privileges on a table to view it in USER TABLES.

F.

All users can query DBA TABLES successfully.

Full Access
Question # 79

You create a table by using this command:

CREATE TABLE rate_list (rate NUMBER(6,2));

Which two are true about executing statements?

A.

INSERT INTO rate_list VALUES (-.9) inserts the value as -.9.

B.

INSERT INTO rate_list VALUES (0.999) produces an error.

C.

INSERT INTO rate_list VALUES (-10) produces an error.

D.

INSERT INTO rate_list VALUES (87654. 556) inserts the value as 87654.6.

E.

INSERT INTO rate_list VALUES (0.551) inserts the value as .55.

F.

INSERT INTO rate_list VALUES (-99.99) inserts the value as 99.99.

Full Access
Question # 80

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

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.

Full Access
Question # 81

Which two queries will result in an error?

A.

SELECT FIRST_NAME LAST_NAME FROM EMPLOYEES;

B.

SELECT FIRST_NAME,LAST_NAME FROM EMPLOYEES;

C.

SELECT LAST_NAME,12 * SALARY AS ANNUAL_SALARY

FROM EMPLOYEES

WHERE ANNUAL_SALARY > 100000

ORDER BY 12 * SALARY ;

D.

SELECT LAST_NAME,12 * SALARY AS ANNUAL_SALARY

FROM EMPLOYEES

WHERE 12 * SALARY > 100000

ORDER BY ANNUAL_SALARY;

E.

SELECT LAST_NAME,12 * SALARY AS ANNUAL_SALARY

FROM EMPLOYEES

WHERE 12 * SALARY > 100000

ORDER BY 12 * SALARY;

F.

SELECT LAST_NAME,12 * SALARY AS ANNUAL_SALARY

FROM EMPLOYEES

WHERE ANNUAL_SALARY > 100000

ORDER BY ANNUAL_SALARY;

Full Access
Question # 82

Examine these requirements:

1. Display book titles for books purchased before January 17, 2007 costing less than 500 or more than 1000.

2. Sort the titles by date of purchase, starting with the most recently purchased book.

Which two queries can be used?

A.

SELECT book_title FROM books WHERE (price< 500 OR >1000) AND (purchase date< '17-JAN-2007') ORDER BY purchase date DESC;

B.

SELECT book_title FROM books WHERE (price IN (500, 1000)) AND (purchase date < '17-JAN-2007') ORDER BY purchase_date ASC;

C.

SELECT book_title FROM books WHERE (price NOT BETWEEN 500 AND 1000) AND (purchase_date< '17-JAN-2007') ORDER BY purchase_date DESC;

D.

SELECT book_title FROM books WHERE (price BETWEEN 500 AND 1000) AND (purchase_date<'17-JAN-2007') ORDER BY purchase_date;

Full Access
Question # 83

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

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.

Full Access
Question # 84

Which statement is true about aggregate functions?

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

Full Access
Question # 85

Which two queries only return CUBE?

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

Full Access
Question # 86

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

A.

Only the primary key can be defined at the column and table level.

B.

The foreign key columns and parent table primary key columns must have the same names.

C.

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.

D.

A table can have only one primary key but multiple foreign keys.

E.

Primary key and foreign key constraints can be defined at both the column and table level.

F.

A table can have only one primary key and one foreign key.

G.

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

Full Access
Question # 87

Which two statements are true about external tables?

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.

Full Access
Question # 88

Examine this SQL statement:

SELECT cust_id, cust_last_name "Last Name

FROM customers

WHERE countryid=10

UNION

SELECT custid CUSTNO, cust_last_name

FROM customers

WHERE countryid=30

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

A.

ORDER BY“CUST NO"

B.

ORDER BY 2, cust_id

C.

ORDERBY2, 1

D.

ORDER BY "Last Name"

E.

ORDER BY CUSTNO

Full Access
Question # 89

You execute this query:

SELECT TO CHAR (NEXT_DAY(LAST_DAY(SYSDATE),’MON’ ),’ dd“Monday for” fmMonth rrr’) FROM DUAL;

What is the result?

A.

It executes successfully but does not return any result.

B.

It returns the date for the first Monday of the next month.

C.

It generates an error.

D.

It returns the date for the last Monday of the current month.

Full Access
Question # 90

Examine these statements executed in a single Oracle session:

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

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

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

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

SAVEPOINT a;

UPDATE product SET pcode=10 WHERE pcode =1;

COMMIT;

DELETE FROM product WHERE pcode =2;

SAVEPOINT b;

UPDATE product SET pcode=30 WHERE pcode =3;

SAVEPOINT c;

DELETE FROM product WHERE pcode =10;

ROLLBACK TO SAVEPOINT b;

COMMIT;

Which three statements are true?

A.

The code for pen is 10.

B.

There is no row containing fountain pen.

C.

There is no row containing pencil.

D.

The code for pen is 1.

E.

The code for fountain pen is 3

F.

There is no row containing pen

Full Access
Question # 91

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

A.

SELECT last_name, salary

FROM employees

WHERE ROWNUM<=3

B.

SELECT last_name,salary

FROM employees

ORDER BY salary

FETCH FIRST 3 ROWS ONLY;

C.

SELECT last_name,salary

FROM employees

WHERE ROWNUM<=3

ORDER BY (SELECT salary FROM employees);

D.

SELECT last_name,salary

FROM (SELECT * FROM employees ORDER BY salary)

E.

SELECT last_name,salary

FROM employees

FETCH FIRST 3 ROWS ONLY

ORDER BY salary;

Full Access
Question # 92

Examine the data in the PRODUCTS table:

Examine these queries:

1. SELECT prod name, prod list

FROM products

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

2. SELECT prod name, | prod _ list

FROM products

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

SELECT prod name, prod _ list

FROM products

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

Which queries generate the same output?

A.

1 and 3

B.

1, 2 and 3

C.

2 and 3

D.

1 and 2

Full Access
Question # 93

Examine this statement:

Which two statements are true?

A.

All remaining employee names will appear in an ascending order

B.

The names of employees remaining the maximum salary will appear first in an ascending order

C.

All remaining employee names will appear in ascending order

D.

All remaining employee names will appear in descending order

E.

The names of employees maximum salary will appear fist to descending order

F.

The names of employees maximum salary will appear fist to ascending order

Full Access
Question # 94

View the Exhibits and examine the structure of the COSTS and PROMOTIONS tables.

You want to display PROD IDS whose promotion cost is less than the highest cost PROD ID in a pro

motion time interval.

Examine this SQL statement:

SELECT prod id

FROM costs

WHERE promo id IN

(SELECT promo id

FROM promotions

WHERE promo_cost < ALL

(SELECT MAX (promo cost)

FROM promotions

GROUP BY (promo_end date-promo_begin_date)) );

What will be the result?

A.

It executes successfully but does not give the required result.

B.

It gives an error because the ALL keyword is not valid.

C.

It gives an error because the GROUP BY clause is not valid

D.

It executes successfully and gives the required result.

Full Access
Question # 95

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?

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;

Full Access
Question # 96

You create a table named 123.

Which statement runs successfully?

A.

SELECT * FROM TABLE (123) ;

B.

SELECT * FROM '123';

C.

SELECT * FROM "123";

D.

SELECT * FROM V'123V';

Full Access
Question # 97

Examine the description of the BOOKS_TRANSACTIONS table:

Examine this partial SQL statement:

SELECT * FROM books_transactions

Which two WHERE conditions give the same result?

A.

WHERE (borrowed_date = SYSDATE AND transaction_type = 'RM') OR member_id IN ('A101','A102');

B.

WHERE borrowed_date = SYSDATE AND transaction_type = 'RM' OR member_id IN('A101','A102');

C.

WHERE borrowed_date = SYSDATE AND transaction_type = 'RM' OR member_id IN('A101','A102');

D.

WHERE borrowed_date = SYSDATE AND transaction_type = 'RM' AND (member_id = 'A101' OR member_id = 'A102'));

E.

WHERE borrowed_date = SYSDATE AND transaction_type = 'RM' AND member_id = 'A101' OR member_id = 'A102');

Full Access