web analytics

Braindump2go Free Microsoft Dumps Questions Collection

Latest Real Exam Questions and Answers to help you pass Microsoft and other Hot exam 100%!

2014 Latest 100% Pass Guaranteed Oracle 1Z0-061 Practice Tests(21-30)

QUESTION 21
Examine the structure of the products table:

image
You want to display the names of the products that have the highest total value for UNIT_PRICE * QTY_IN_HAND.
Which SQL statement gives the required output?

image

A.    Option A
B.    Option B
C.    Option C
D.    Option D

Answer: A

QUESTION 22
Which statement is true regarding the UNION operator?

A.    By default, the output is not sorted.
B.    Null values are not ignored during duplicate checking.
C.    Names of all columns must be identical across all select statements.
D.    The number of columns selected in all select statements need not be the same.

Answer: D
Explanation:
The SQL UNION query allows you to combine the result sets of two or more SQL SELECT statements. It removes duplicate rows between the various SELECT statements. Each SQL SELECT statement within the UNION query must have the same number of fields in the result sets with similar data types.

QUESTION 23
View the Exhibit and examine the data in the PROMO_NAME and PROMO_END_DATE columns of the promotions table, and the required output format.

image
Which two queries give the correct result?

image

A.    Option A
B.    Option B
C.    Option C
D.    Option D

Answer: CD

QUESTION 24
View the Exhibit and examine the structures of the employees and departments tables.

image
You want to update the employees table as follows:
– Update only those employees who work in Boston or Seattle (locations 2900 and 2700).
– Set department_id for these employees to the department_id corresponding to London (location_id 2100).
– Set the employees’ salary in iocation_id 2100 to 1.1 times the average salary of their department.
– Set the employees’ commission in iocation_id 2100 to 1.5 times the average commission of their department.
You issue the following command:

image
What is the outcome?

A.    It executes successfully and gives the correct result.
B.    It executes successfully but does not give the correct result.
C.    It generates an error because a subquery cannot have a join condition in an update statement.
D.    It generates an error because multiple columns (SALARY, COMMISSION) cannot be specified together in
an update statement.

Answer: B

QUESTION 25
You need to produce a report where each customer’s credit limit has been incremented by $1000. In the output, the customer’s last name should have the heading Name and the incremented credit limit should be labeled New credit Limit. The column headings should have only the first letter of each word in uppercase.
Which statement would accomplish this requirement?

image

A.    Option A
B.    Option B
C.    Option C
D.    Option D

Answer: C
Explanation:
A column alias:
– Renames a column heading
– Is useful with calculations
– Immediately follows the column name (There can also be the optional AS keyword between the column name and the alias.)
– Requires double quotation marks if it contains spaces or special characters, or if it is case sensitive.

QUESTION 26
View the Exhibit and examine the data in the costs table.

image
You need to generate a report that displays the IDs of all products in the costs table whose unit price is at least 25% more than the unit cost. The details should be displayed in the descending order of 25% of the unit cost.
You issue the following query:

image
Which statement is true regarding the above query?

A.    It executes and produces the required result.
B.    It produces an error because an expression cannot be used in the order by clause.
C.    It produces an error because the DESC option cannot be used with an expression in the order by clause.
D.    It produces an error because the expression in the ORDER by clause should also be specified in the
SELECT clause.

Answer: A

QUESTION 27
View the Exhibits and examine the structures of the products, sales, and customers tables.

image

image

image
You need to generate a report that gives details of the customer’s last name, name of the product, and the quantity sold for a customers in ‘Tokyo’.
Which two queries give the required result?

image

A.    Option A
B.    Option B
C.    Option C
D.    Option D

Answer: AC

QUESTION 28
View the Exhibit and examine the structure of the products table.

image
Evaluate the following query:

image
What would be the outcome of executing the above SQL statement?

A.    It produces an error.
B.    It shows the names of all products in the table.
C.    It shows the names of products whose list price is the second highest in the table.
D.    It shows the names of all products whose list price is less than the maximum list price.

Answer: C

QUESTION 29
You issued the following command:
SQL> DROP TABLE employees;
Which three statements are true?

A.    All uncommitted transactions are committed.
B.    All indexes and constraints defined on the table being dropped are also dropped.
C.    Sequences used in the employees table become invalid.
D.    The space used by the employees table is reclaimed immediately.
E.    The employees table can be recovered using the rollback command.
F.    The employees table is moved to the recycle bin.

Answer: BCF
Explanation:
http://www.sqlcourse.com/drop.html

QUESTION 30
Examine the create table statements for the stores and sales tables.
SQL> CREATE TABLE stores(store_id NUMBER(4) CONSTRAINT store_id_pk PRIMARY KEY, store_name VARCHAR2(12), store_address VARCHAR2(20), start_date DATE);
SQL> CREATE TABLE sales(sales_id NUMBER(4) CONSTRAINT sales_id_pk PRIMARY KEY, item_id NUMBER(4), quantity NUMBER(10), sales_date DATE, store_id NUMBER(4), CONSTRAINT store_id_fk FOREIGN KEY(store_id) REFERENCES stores(store_id));
You executed the following statement:
SQL> DELETE from stores
WHERE store_id=900;
The statement fails due to the integrity constraint error:
ORA-02292: integrity constraint (HR.STORE_ID_FK) violated
Which three options ensure that the statement will execute successfully?

A.    Disable the primary key in the STORES table.
B.    Use CASCADE keyword with DELETE statement.
C.    DELETE the rows with STORE_ID = 900 from the SALES table and then delete rows from STORES table.
D.    Disable the FOREIGN KEY in SALES table and then delete the rows.
E.    Create the foreign key in the SALES table on SALES_ID column with on DELETE CASCADE option.

Answer: ACD

…go to http://www.lead2pass.com/1z0-061.html to download the full version Q&As.

try_now

, , , , , ,

Comments are currently closed.