Summer Sale- Special Discount Limited Time 65% Offer - Ends in 0d 00h 00m 00s - Coupon code: netdisc

Oracle 1z0-071 Oracle Database 12c SQL Exam Practice Test

Page: 1 / 32
Total 321 questions

Oracle Database 12c SQL Questions and Answers

Question 1

Which two statements are true about truncate and delete?

Options:

A.

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

B.

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

C.

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

D.

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

E.

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

Question 2

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

Options:

A.

Foreign key columns allow null values.

B.

Unique key columns allow null values

C.

Primary key columns allow null values.

D.

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

E.

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

Question 3

Examine these two queries and their output:

SELECT deptno, dname FROM dept;

Question # 3

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

Question # 3

Now examine this query:

SELECT ename, dname

FROM emp CROSS JOIN dept WHERE job = 'MANAGER'

AND dept.deptno IN (10, 20) ;

Options:

A.

64

B.

6

C.

3

D.

12

Question 4

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.

Question 5

Which three statements are true about views in an Oracle database?

Options:

A.

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

B.

The WITH CHECK clause prevents certain rows from being updated or inserted.

C.

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

D.

Date Manipulation Language (DML) can always be used on views.

E.

Deleting one or more rows using a view whose defining query contains a GROUP BY clause will cause an error.

F.

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

G.

Inserting one or more rows using a view whose defining query contains a GROUP BY clause will cause an error.

Question 6

Examine the description of the transactions table:

Which two SQL statements execute successfully?

Options:

A.

SELECT customer_id AS "CUSTOMER-ID", transaction_date AS DATE, amount+100 "DUES" from transactions;

B.

SELECT customer_id AS 'CUSTOMER-ID',transaction_date AS DATE, amount+100 'DUES' from transactions;

C.

SELECT customer_id CUSTID, transaction_date TRANS_DATE,amount+100 DUES FROM transactions;

D.

SELECT customer_id AS "CUSTOMER-ID", transaction_date AS "DATE", amount+100 DUES FROM transactions;

E.

SELECT customer id AS CUSTOMER-ID, transaction_date AS TRANS_DATE, amount+100 "DUES AMOUNT" FROM transactions;

Question 7

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.

Question 8

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?

Options:

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.

Question 9

Which two statements are true? (Choose two.)

Options:

A.

The USER SYNONYMS view can provide information about private synonyms.

B.

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

C.

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

D.

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

E.

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

Question 10

Examine the description or the BOOKS_TRANSACTIONS table:

Question # 10

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

Which query should be used?

Options:

A.

SELECT cust_first_name, cust_credit_limit * . 05 AS DUE AMOUNT

FROM customers

WHERE cust income_level !=NULL

AND cust credit_level !=NULL;

B.

SELECT cust_first_name, cust_credit_limit * . 05 AS DUE AMOUNT

FROM customers

WHERE cust income_level IS NOT NULL

AND due_amount IS NOT NULL;

C.

SELECT cust_first_name, cust_credit_limit * . 05 AS DUE AMOUNT

FROM customers

WHERE cust income_level <> NULL

AND due_amount <> NULL;

D.

SELECT cust_first_name, cust_credit_limit * . 05 AS DUE AMOUNT

FROM customers

WHERE cust_income_level IS NOT NULL

AND cust_credit_limit IS NOT NULL;

E.

SELECT cust_first_name, cust_credit_limit * . 05 AS DUE AMOUNT

FROM customers

WHERE cust income_level !=NULL

AND due_amount !=NULL;

Question 11

You need to allow user ANDREW to:

1. Modify the TITLE and ADDRESS columns of your CUSTOMERS table.

2. GRANT tha permission to other users.

Which statement will do this?

Options:

A.

GRANT UPDATE (title, address) ON customers TO andrew WITH ADMIN OPTION;

B.

GRANT UPDATE ON customers. title, customers.address TO andrew WITH GRANT OPTION;

C.

GRANT UPDATE ON customers.title, customers.address TO andrew WITH ADMIN OPTION;

D.

GRANT UPDATE (title, address) ON customers TO andrew;

E.

GRANT UPDATE ON customers. title, customers.address TO andrew;

F.

GRANT UPDATE (title, address) ON customers TO andrew WITH GRANT OPTION:

Question 12

Examine the description of the CUSTONERS table

Question # 12

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

Question 13

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

Options:

A.

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

B.

The WITH CHECK clause has no effect when deleting rows from the underlying table through the view.

C.

Views cannot be used to query rows from an underlying table if the table has a PRIPOARY KEY and the PRIMARY KEY columns are not referenced in the defining query of the view.

D.

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

E.

Views cannot be used to add on modify rows in an underlying table if the defining query of the view contains aggregating functions.

F.

Views cannot be used to add rows to an underlying table if the table has columns with NOT NULL constraints lacking default values which are not referenced in the defining query of the view.

Question 14

Which two are true about granting privilege on objects?

Options:

A.

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

B.

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

C.

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

D.

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

E.

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

Question 15

You execute these commands:

SQL> DEFINE hiredate = ’01-APR -2011’;

SQL> SELECT employee_id, first_name, salary FROM employees WHERE hire date > &hiredate AND manager_id >&mgr_id;

For which substitution variables will you be prompted?

Options:

A.

none

B.

&hiredate and &mgr_id

C.

only &hiredate

D.

only &mgr_id

Question 16

Which two statements are true about Oracle synonyms?

Options:

A.

A synonym can have a synonym.

B.

A synonym has an object number.

C.

Any user can create a public synonym.

D.

All private synonym names must be unique in the database.

E.

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

Question 17

Which three statements are true about views in an Oracle database?

Options:

A.

A SELECT statement cannot contain a where clause when querying a view containing a WHERE clause in its defining query

B.

Rows inserted into a table using a view are retained in the table if the view is dropped

C.

Views can join tables only if they belong to the same schema.

D.

Views have no segment.

E.

Views have no object number.

F.

A view can be created that refers to a non-existent table in its defining query.

Question 18

Examine the description of the PRODUCTS table:

Question # 18

Which three queries use valid expressions?

Options:

A.

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

B.

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

C.

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

D.

SPLECT product_id, expiry_date * 2 FROM products;

E.

SELEGT product_id, unit_price, unit_price + surcharge FROM products;

F.

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

Question 19

Question # 19

Which two queries will result in an error?

Options:

A.

SELECT FIRST_NAME LAST_NAME FROM EMPLOYEES;

B.

SELECT FIRST_NAME,LAST_NAME FROM EMPLOYEES;

C.

SELECT LAST_NAME,12 * SALARY AS ANNUAL_SALARY

FROM EMPLOYEES

WHERE ANNUAL_SALARY > 100000

ORDER BY 12 * SALARY ;

D.

SELECT LAST_NAME,12 * SALARY AS ANNUAL_SALARY

FROM EMPLOYEES

WHERE 12 * SALARY > 100000

ORDER BY ANNUAL_SALARY;

E.

SELECT LAST_NAME,12 * SALARY AS ANNUAL_SALARY

FROM EMPLOYEES

WHERE 12 * SALARY > 100000

ORDER BY 12 * SALARY;

F.

SELECT LAST_NAME,12 * SALARY AS ANNUAL_SALARY

FROM EMPLOYEES

WHERE ANNUAL_SALARY > 100000

ORDER BY ANNUAL_SALARY;

Question 20

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

Question 21

Examine the description of the BOOKS table:

Question # 21

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.

Question 22

Examine this list of queries:

Which two statements are true?

Options:

A.

1 and 4 give the same result.

B.

2 returns the value 20.

C.

2 and 3 give the same result.

D.

3 returns an error.

E.

1 and 4 give different results.

Question 23

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

Question 24

You execute this command:

ALTER TABLE employees SET UNUSED (department_id);

Which two are true?

Options:

A.

A query can display data from the DEPARTMENT_ID column.

B.

The storage space occupied by the DEPARTMENT_ID column is released only after a COMMIT is issued.

C.

The DEPARTMENT_ID column is set to null for all tows in the table

D.

A new column with the name DEPARTMENT_ID can be added to the EMPLOYEES table.

E.

No updates can be made to the data in the DEPARTMENT_ID column.

F.

The DEPARTMENT_ID column can be recovered from the recycle bin

Question 25

Which two statements are true about * TABLES views?

Options:

A.

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

B.

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

C.

USER TABLES displays all tables owned by the current user.

D.

All TABLES displays all tables owned by the current user.

E.

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

F.

All users can query DBA TABLES successfully.

Question 26

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

Options:

A.

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

B.

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

C.

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

D.

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

E.

A descending index is a type of function-based index

F.

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

Question 27

Which two statements are true about INTERVAL data types

Options:

A.

INTERVAL YEAR TO MONTH columns only support monthly intervals within a range of years.

B.

The value in an INTERVAL DAY TO SECOND column can be copied into an INTERVAL YEAR TO MONTH column.

C.

INTERVAL YEAR TO MONTH columns only support monthly intervals within a single year.

D.

The YEAR field in an INTERVAL YEAR TO MONTH column must be a positive value.

E.

INTERVAL DAY TO SECOND columns support fractions of seconds.

F.

INTERVAL YEAR TO MONTH columns support yearly intervals.

Question 28

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.

Question 29

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.

Question 30

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

this result:

DATE

02-JAN-2020

Which statement returns this?

Options:

A.

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

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

FROM DUAL;

B.

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

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

FROM DUAL;

C.

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

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

FROM DUAL;

D.

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

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

FROM DUAL;

E.

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

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

FROM DUAL;

Question 31

Which two statements are true about conditional INSERT ALL?

Options:

A.

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

B.

It cannot have an ELSE clause.

C.

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

D.

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

E.

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

Question 32

Which two are true about virtual columns?

Options:

A.

They can be referenced In the where clause of an update or debete statement.

B.

They can be referenced in the set clause of an update statement as the name of the column To be updated.

C.

They can be indexed.

D.

They cannot have a data type explicitly specified.

E.

They can be referenced in the column expression of another virtxial column.

Question 33

Which three are true about scalar subquery expressions?

Options:

A.

A scalar subquery expression that returns zero rows evaluates to zoro

B.

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

C.

They can be nested.

D.

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

E.

They cannot be used in group by clauses.

F.

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

Question 34

Which three statements are true about GLOBAL TEMPORARY TABLES?

Options:

A.

A GLOBAL TEMPORARY TABLE cannot have PUBLIC SYNONYM.

B.

A GLOBAL TEMPORARY TABLE can have multiple indexes

C.

A GLOBAL TEMPORARY TABLE can be referenced in the defining query of a view.

D.

Data Manipulation Language (DML) on GLOBAL TEMPORARY TABLES generates no REDO.

E.

A GLOBAL TEMPORARY TABLE can have only one index.

F.

A trigger can be created on a GLOBAL TEMPORARY TABLE

Question 35

Which two statements about INVISIBLE indexes are true?

Options:

A.

an INVISIBLE Index consumes no storage

B.

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

C.

The query optimIzer never considers INVISIBLE Indexes when determining execution plans

D.

You use AlTER INDEX to make an INVISIBLE Index VISIBLE

E.

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

Question 36

Examine the description of the EMPLOYEES table:

Question # 36

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;

Question 37

Which three are true about privileges?

Options:

A.

Schema owners can grant object privileges on objects in their schema to any other user or role.

B.

A combination of object and system privileges can be granted to a role.

C.

All types of schema objects have associated object privileges .

D.

Only users with the DBA role can create roles .

E.

Object privileges granted on a table automatically apply to all synonyms for that table.

F.

Only users with the GRANT ANY PRIVILEGE privilege can grant and revoke system privileges from other users.

Question 38

A session's NLS_DATE_FORMAT is set to DD Mon YYYY .

Which two queries return the value 1 Jan 2019?

Options:

A.

SELECT to_date(' 2019-01-01 ', 'YYYY -MM-DD' ) FROM DUAL;

B.

SELECT DATE '2019-01-01' FROM DUAL ;

C.

SELECT TO_CHAR('2019-01-01') FROM DUAL; 2019-01-01

D.

SELECT '2019-01-01' FROM DUAL ; 2019-01-01

E.

SELECT TO_ DATE('2019-01-01') FROM DUAL;

Question 39

Examine the description of the CUSTONERS table:

Question # 39

CUSTNO is the PRIMARY KEY.

You must determine if any customers' details have been entered more than once using a different CUSTNO, by listing all duplicate names.

Which two methods can you use to get the required result?

Options:

A.

LEFT OUTER JOIN with self join

B.

PULL OUTER JOIN with self join

C.

subquery

D.

RIGHT OUTER JOIN with self join

E.

self Join

Question 40

Which three statements are true about an ORDER BY clause?

Options:

A.

An ORDER BY clause always sorts NULL values last.

B.

An ORDER BY clause can perform a binary sort

C.

An ORDER BY clause can perform a linguistic sort

D.

By default an ORDERBY clause sorts rows in ascending order

E.

An ORDR BY clause will always precede a HAVI NG clause if both are used in the same top-level

Question 41

Examine the BRICKS table:

Question # 41

You write this query:

SELECT

FROM bricks b1 CROSS JOIN bricks b2

WHERE b1. Weight < b2. Weight:

How many rows will the query return?

Options:

A.

1

B.

16

C.

10

D.

6

E.

4

F.

0

Question 42

Examine this query:

SELECT employee_id,first_name,salary

FROM employees

WHERE hire_date>'&1';

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

Options:

A.

Use the DEFINE command before executing the query.

B.

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

C.

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

D.

Execute the SET VERIFY OFF command before executing the query.

E.

Use the UNDEFINE command before executing the query.

F.

Execute the SET VERIFY ON command before executing the query.

Question 43

Which two are true about granting privilege on objects?

Options:

A.

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

B.

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

C.

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

D.

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

E.

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

Question 44

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.

Question 45

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:

Question # 45

Which two statements are true?

Options:

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.

Question 46

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

Options:

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.

Question 47

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.

Question 48

Which three are true about subqueries?

Options:

A.

A subquery can be used in a WHERE clause.

B.

A subquery can be used in a HAVING clause.

C.

=ANY can only evaluate the argument against a subcjuery if it returns two or more values.

D.

E.

A subquery cannot be used in a FROM clause.

F.

< any returns true if the argument is less than the lowest value returned by the subquery.

G.

A subquery cannot be used in the select list.

Question 49

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.

Question 50

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.

Question 51

BOOK_SEQ is an existing sequence in your schema.

Which two CREATE TABLE commands are valid?

Options:

A.

CREATE TABLE bookings (

bk_id NUMBER(4) NOT NULL PRIMARY KEY,

start_date DATE NOT NULL,

end_date DATE DEFAULT SYSDATE);

B.

CREATE TABLE bookings (

bk_id NUMBER(4) NOT NULL DEFAULT book_seq.CURRVAL,

start_date DATE NOT NULL,

end_date DATE DEFAULT SYSDATE);

C.

CREATE TABLE bookings (

bk_id NUMBER(4) DEFAULT book_seq.CURRVAL,

start_date DATE DEFAULT SYSDATE,

end_date DATE DEFAULT start date);

D.

CREATE TABLE bookings ( bk_id NUMBER(4),

start_date DATE DEFAULT SYSDATE,

end_date DATE DEFAULT (end_date >= start_date));

E.

CREATE TABLE bookings (

bk_id NUMBER(4) DEFAULT book_seq.NEXTVAL PRIMARY KEY,

start_date DATE DEFAULT SYSDATE,

end_date DATE DEFAULT SYSDATE NOT NULL);

Question 52

Examine this query which executes successfully;

Select job,deptno from emp

Union all

Select job,deptno from jobs_history;

What will be the result?

Options:

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.

Question 53

You have the privileges to create any type of synonym.

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

Options:

A.

CREATE GLOBAL SYNONYM emp FOR hcm.employee_records;

B.

CREATE SYNONYM emp FOR hcm.employee_records;

C.

CREATE SYNONYM PUBLIC.emp FOR hcm.employee_records;

D.

CREATE SYNONYM SYS.emp FOR hcm.employee_records;

E.

CREATE PUBLIC SYNONYM emp FOR hcm. employee_records;

Question 54

Which two are true about transactions in the Oracle Database?

Options:

A.

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

B.

A DDL statement issued by a session with an uncommitted transaction automatically Commits that transaction.

C.

DML statements always start new transactions.

D.

DDL statements automatically commit only data dictionary updates caused by executing the DDL.

E.

An uncommitted transaction is automatically committed when the user exits SQL*Plus.

Question 55

Which three items does a direction of a relationship contain?

Options:

A.

an attribute

B.

a cardinality

C.

label

D.

an optionality

E.

a unique identifier

F.

an entity

Question 56

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

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

Options:

A.

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

B.

COMMIT ends the transaction and makes all its changes permanent.

C.

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

D.

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

E.

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

F.

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

Question 57

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

Options:

A.

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

B.

The WITH CHECK clause has no effect when deleting rows from the underlying table through the view.

C.

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

D.

Views cannot be used to add rows to an underlying table If the table has columns with NOT NULL constraints lacking default values which are not referenced in the defining query of the view.

E.

Views cannot be used to query rows from an underlying table if the table has a PRIMARY KEY and the primary key columns are not referenced in the defining query of the view.

F.

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

Question 58

Which three statements are true?

Options:

A.

A customer can exist in many countries.

B.

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

C.

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

D.

The SALES table has five foreign keys.

E.

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

F.

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

Question 59

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.

Question 60

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.

Question 61

Examine the description of the BOOKS_TRANSACTIONS table:

Question # 61

Examine this partial SQL statement:

SELECT * FROM books_transactions

Which two WHERE conditions give the same result?

Options:

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

Question 62

Examine the description of the ORDERS table:

Question # 62

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;

Question 63

Examine this statement,which executes successfully:

In which order are the rows displayed?

Options:

A.

sorted by DEPARTMENT_NAME

B.

sorted by DEPARTMENT_NAME and AVGSAL

C.

sorted by DEPARTMENT_NAME and MAXSAL

D.

sorted by AVGSAL

E.

Sorted by MAXSAL

Question 64

Which statement falls to execute successfully?

Options:

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;

Question 65

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.

Question 66

Examine this partial statement:

SELECT ename, sal,comm FROM emp

Now examine this output:

Question # 66

WHICH ORDER BY clause will generate the displayed output?

Options:

A.

ORDER BY NVL(enam,0) DESC, ename

B.

ORDER BY NVL(comm,0) ASC NULLS FIRST, ename

C.

ORDER BY NVL(comm,0) ASC NULLS LAST, ename

D.

ORDER BY comm DESC NULLS LAST, ename

Question 67

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:

Question 68

Examine the description of the CUSTOMERS table:

Question # 68

Which three statements will do an implicit conversion?

Options:

A.

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

B.

SELECT * FROM customers WHERE customer id = '0001';

C.

SELECT * FROM customers WHERE customer_ id = 0001;

D.

SELECT FROM customers WHERE insert date = '01-JAN-19';

E.

SELECT. FROM customers WHERE insert_ date = DATE *2019-01-01';

F.

SELECT. FRON customers WE TO DATE (Insert _ date) = DATE ‘2019-01-01’;

Question 69

Examine the description of the PRODUCT_ DETAILS table:

Question # 69

Which two statements are true?

Options:

A.

PRODUCT_ PRICE can be used in an arithmetic expression even if it has no value stored in it.

B.

PRODUCT_ ID can be assigned the PRIMARY KEY constraint.

C.

EXPIRY_ DATE cannot be used in arithmetic expressions.

D.

EXPIRY_ DATE contains the SYSDATE by default if no date is assigned to it.

E.

PRODUCT_ PRICE contains the value zero by default if no value is assigned to it.

F.

PRODUCT_ NAME cannot contain duplicate values.

Question 70

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

Options:

A.

SELECT NEXTVAL FROM emp_ seq;

B.

SELECT CURRVAL FROM emp_ seq;

C.

SELECT emp_ seq. CURRVAL FROM DUAL;

D.

SELECT emp_ seq . NEXTVAL FROM DUAL;

Question 71

Which three actions can you perform on an existing table containing date?

Options:

A.

Add a new column as the table's first column.

B.

Define a default value that is automatically inserted into a column containing nulls.

C.

Add a new NOT NULL Column with a DEFAULT value.

D.

Change a DATE Column containing data to a NUMBER data type.

E.

Increase the width of a numeric column.

F.

Change the default value of a column.

Question 72

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.

Question 73

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

Options:

A.

Create a directory object for an external table.

B.

Read data from an external table and load it into a table in the database.

C.

Query data from an external table.

D.

Create a directory object for a flat file.

E.

Execute DML statements on an external table.

F.

Read data from a table in the database and insert it into an external table.

Question 74

Examine the description of the EMPLOYEES table:

Question # 74

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

Options:

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;

Question 75

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

Question 76

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.

Question 77

Choose two

Examine the description of the PRODUCT DETALS table:

Question # 77

Options:

A.

PRODUCT_ID can be assigned the PEIMARY KEY constraint.

B.

EXPIRY_DATE cannot be used in arithmetic expressions.

C.

EXPIRY_DATE contains the SYSDATE by default if no date is assigned to it

D.

PRODUCT_PRICE can be used in an arithmetic expression even if it has no value stored in it

E.

PRODUCT_PRICE contains the value zero by default if no value is assigned to it.

F.

PRODUCT_NAME cannot contain duplicate values.

Question 78

Which three are true about privileges and roles?

Options:

A.

A role is owned by the user who created it.

B.

System privileges always set privileges for an entire database.

C.

All roles are owned by the SYS schema.

D.

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

E.

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

F.

PUBLIC can be revoked from a user.

G.

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

Question 79

Examine the description of the EMPLOYEES table:

Question # 79

Which query is valid?

Options:

A.

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

B.

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

C.

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

D.

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

Question 80

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

Question 81

Examine the data in the EMP table:

Question # 81

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.

Question 82

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

Question 83

Examine the description of the EMPLOYEES table:

Question # 83

Examine this query:

Question # 83

Which line produces an error?

Options:

A.

Line 7

B.

Line 8

C.

Line 3

D.

Line 5

Question 84

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.

Question 85

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.

Question 86

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;

Question 87

Examine the description of the EMPLOYEES table:

Question # 87

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;

Question 88

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

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

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

Options:

A.

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

B.

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

C.

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

D.

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

E.

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

Question 89

Examine the description of the PRODUCTS table:

Question # 89

Which two statements execute without errors?

Options:

A.

MERGE INTO new_prices n

USING (SELECT * FROM products) p

WHEN MATCHED THEN

UPDATE SET n.price= p.cost* 01

WHEN NOT MATCHED THEN

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

WHERE(p.cost<200);

B.

MERGE INTO new_prices n

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

ON (n.prod_id= p.prod_id)

WHEN MATCHED THEN

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

DELETE WHERE (p.cost<200);

C.

MERGE INTO new_prices n

USING products p

ON (p.prod_id =n.prod_id)

WHEN NOT MATCHED THEN

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

WHERE (p.cost<200);

D.

MERGE INTO new_prices n

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

ON (n.prod_id= p.prod_id)

WHEN MATCHED THEN

DELETE WHERE (p.cost<200)

Question 90

Which two statements are true about the WHERE and HAVING clauses in a SELECT statement?

Options:

A.

The WHERE clause can be used to exclude rows after dividing them into groups

B.

WHERE and HAVING clauses can be used in the same statement only if applied to different table columns.

C.

The HAVING clause can be used with aggregating functions in subqueries.

D.

Aggregating functions and columns used in HAVING clauses must be specified in these SELECT list of a query.

E.

The WHERE clause can be used to exclude rows before dividing them into groups.

Question 91

Examine the description of the PROMOTIONS TABLE:

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

Which two queries can be used?

Options:

A.

SELECT DISTINCT promo_category, promo_cost FROM promotions ORDER BY 1;

B.

SELECT promo_cost, promo_category FROM promotions ORDER BY 1

C.

SELECT promo_category, DISTINCT promo_cost FROM promotiong ORDER BY 2:

D.

select DISTINCT promo_categoryIl ‘has’||promol_cost as COSTS FROM promotions ORDER BY 1:

E.

SELECT DISTINCT promo_cost ||’in’IIDISTINCT promo_category promotions ORDER BY1:

Question 92

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.

Question 93

Examine this query:

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

Options:

A.

16

B.

160

C.

150

D.

200

E.

100

Question 94

Which three are true about the MERGE statement?

Options:

A.

It can merge rows only from tables.

B.

It can use views to produce source rows.

C.

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

D.

It can use subqueries to produce source rows.

E.

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

F.

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

Question 95

Which two statements are true about Oracle databases and SQL?

Options:

A.

Updates performed by a database user can be rolled back by another user by using the ROLLBACK command.

B.

The database guarantees read consistency at select level on user-created tablers.

C.

When you execute an UPDATE statement, the database instance locks each updated row.

D.

A query can access only tables within the same schema.

E.

A user can be the owner of multiple schemas In the same database.

Question 96

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?

Options:

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

Page: 1 / 32
Total 321 questions