Pass the Oracle Oracle PL 1z0-071 Questions and answers with CertsForce

Viewing page 8 out of 10 pages
Viewing questions 71-80 out of questions
Questions # 71:

Which four statements are true about constraints on Oracle tables?

Options:

A.

A Column can have only one CHECK Constraint.


B.

A NOT NULL Constraint can be defined at the table level.


C.

A UNIQUE constraint permits NULLS.


D.

A PRIMARY KEY Constraint can be added after a table has been created and populated.


E.

A CHECK Constraint can refer to values in other rows.


F.

A UNIQUE Constraint can use a pre-existing index on the constrained column or columns.


G.

A FOREIGN KEY Column can contain NULLS.


Expert Solution
Questions # 72:

Examine the data in the CUST_NAME column of the CUSTOMERS table:

CUST_NAME

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

Renske Ladwig

Jason Mallin

Samuel McCain

Allan MCEwen

Irene Mikkilineni

Julia Nayer

You want to display the CUST_NAME values where the last name starts with Mc or MC.

Which two WHERE clauses give the required result?

Options:

A.

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


B.

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


C.

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


D.

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


E.

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


Expert Solution
Questions # 73:

Which three queries execute successfully?

Options:

A.

SELECT (SYSDATE-DATE '2019-01-01') / 1 FROM DUAL;


B.

SELECT 1 / SYSDATE - DATE '2019-01-01' FROM DUAL;


C.

SELECT SYSDATE / DATE '2019-01-01' - 1 FROM DUAL


D.

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


E.

SELECT 1 – SYSDATE- DATE '2019-01-01' FROM DUAL;


F.

SELECT SYSDATE - 1 - DATE'2019-01-01' EROM DUAL;


Expert Solution
Questions # 74:

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.


Expert Solution
Questions # 75:

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?

Options:

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;


Expert Solution
Questions # 76:

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

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

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

Options:

A.

SELECT product id, quantity on hand, supplier id

FROM product information

NATURAL JOIN inventories AND quantity .on hand < 5;


B.

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

FROM product_information pi JOIN inventories i

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


C.

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

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


D.

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

FROM product information pi JOIN inventories i

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


Expert Solution
Questions # 77:

Which three are true about dropping columns from a table?

Options:

A.

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


B.

A column drop is implicitly committed


C.

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


D.

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


E.

A primary key column cannot be dropped.


F.

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


Expert Solution
Questions # 78:

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

Options:

A.

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


B.

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


C.

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


D.

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


E.

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


Expert Solution
Questions # 79:

Which two statements are true about substitution variables?

Options:

A.

A substitution variable used to prompt for a column name must be endorsed in single quotation marks.


B.

A substitution variable used to prompt for a column name must be endorsed in double quotation marks.


C.

A substitution variable prefixed with & always prompts only once for a value in a session.


D.

A substitution variable can be used with any clause in a SELECT statement.


E.

A substitution variable can be used only in a SELECT statement.


F.

A substitution variable prefixed with 6 prompts only once for a value in a session unless is set to undefined in the session.


Expert Solution
Questions # 80:

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.


Expert Solution
Viewing page 8 out of 10 pages
Viewing questions 71-80 out of questions