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(11-20)

QUESTION 11
View the Exhibit and examine the structure of the customers table.

image
Using the customers table, you need to generate a report that shows an increase in the credit limit by 15% for all customers. Customers whose credit limit has not been entered should have the message "Not Available" displayed.
Which SQL statement would produce the required result?

 

image

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

Answer: D
Explanation
NVL Function
Converts a null value to an actual value:
Data types that can be used are date, character, and number.
Data types must match:
NVL(commission_pct, 0)
NVL(hire_date, ’01-JAN-97′)
NVL(job_id, ‘No Job Yet’)

QUESTION 12
View the Exhibit and examine the structure of the promotions table.

image
Evaluate the following SQL statement:

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

A.    It shows COST_REMARK for all the promos in the table.
B.    It produces an error because the SUBQUERY gives an error.
C.    It shows COST_REMARK for all the promos in the promo category ‘TV’
D.    It produces an error because SUBQUERIES cannot be used with the case expression.

Answer: A

QUESTION 13
Examine the structure and data of the CUST_TRANS table:

image
Dates are stored in the default date format dd-mon-rr in the CUST_TRANS table. Which three SQL statements would execute successfully?

A.    SELECT transdate + ’10’ FROM cust_trans;
B.    SELECT * FROM cust_trans WHERE transdate = ’01-01-07′;
C.    SELECT transamt FROM cust_trans WHERE custno > "11";
D.    SELECT * FROM cust_trans WHERE transdate=’01-JANUARY-07′;
E.    SELECT custno + ‘A’ FROM cust_trans WHERE transamt > 2000;

Answer: ACD

QUESTION 14
View the Exhibit and examine the structure of the customers table.

image
NEW_CUSTOMERS is a new table with the columns CUST_ID, CUST_NAME and CUST_CITY that have the same data types and size as the corresponding columns in the customers table.
Evaluate the following insert statement:

image
The insert statement fails when executed.
What could be the reason?

A.    The values clause cannot be used in an INSERT with a subquery.
B.    Column names in the NEW_CUSTOMERS and CUSTOMERS tables do not match.
C.    The where clause cannot be used in a subquery embedded in an INSERT statement.
D.    The total number of columns in the NEW_CUSTOMERS table does not match the total number of
columns in the CUSTOMERS table.

Answer: A
Explanation:
Copying Rows from Another Table
Write your INSERT statement with a subquery:
Do not use the VALUES clause.
Match the number of columns in the INSERT clause to those in the subquery. Inserts all the rows returned by the subquery in the table, sales_reps.

QUESTION 15
YOU need to display the date ll-oct-2007 in words as `Eleventh of October, Two Thousand Seven’.
Which SQL statement would give the required result?

image

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

Answer: A

QUESTION 16
Examine the data in the ORD_ITEMS table:

image
Evaluate the following query:

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

A.    It gives an error because the having clause should be specified after the group by clause.
B.    It gives an error because all the aggregate functions used in the having clause must be specified
in the select list.
C.    It displays the item nos with their average quantity where the average quantity is more than double
the minimum quantity of that item in the table.
D.    It displays the item nos with their average quantity where the average quantity is more than double
the overall minimum quantity of all the items in the table.

Answer: C

QUESTION 17
View the Exhibit and examine the data in the promotions table.

image
PROMO_BEGIN_DATE is stored in the default date format, dd-mon-rr.
You need to produce a report that provides the name, cost, and start date of all promos in the post category that were launched before January 1, 2000.
Which SQL statement would you use?

image

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

Answer: D

QUESTION 18
You need to create a table with the following column specifications:
1. Employee ID (numeric data type) for each employee
2. Employee Name (character data type) that stores the employee name
3. Hire date, which stores the date of joining the organization for each employee
4. Status (character data type), that contains the value ‘active1 if no data is entered
5. Resume (character large object [CLOB] data type), which contains the resume submitted by the employee
Which is the correct syntax to create this table?

image

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

Answer: D
Explanation:
CLOB Character data (up to 4 GB)
NUMBER [(p, s)] Number having precision p and scale s (Precision is the total number of decimal digits and scale is the number of digits to the right of the decimal point; precision can range from 1 to 38, and scale can range from ?4 to 127.)

QUESTION 19
Examine the structure of the sales table:

image
Evaluate the following create table statement:

image
Which two statements are true about the creation of the SALES1 table?

A.    The SALES1 table is created with no rows but only a structure.
B.    The SALES1 table would have primary key and unique constraints on the specified columns.
C.    The SALES1 table would not be created because of the invalid where clause.
D.    The SALES1 table would have not null and unique constraints on the specified columns.
E.    The SALES1 table would not be created because column-specified names in the select and create
table clauses do not match,

Answer: A

QUESTION 20
Which two statements are true regarding subqueries?

A.    A subquery can retrieve zero or more rows.
B.    Only two subqueries can be placed at one level.
C.    A subquery can be used only in SQL query statements.
D.    A subquery can appear on either side of a comparison operator.
E.    There is no limit on the number of subquery levels in the WHERE clause of a SELECT statement.

Answer: AD
Explanation:
Using a Subquery to Solve a Problem
Suppose you want to write a query to find out who earns a salary greater than Abel’s salary.
To solve this problem, you need two queries: one to find how much Abel earns, and a second query to find who earns more than that amount. You can solve this problem by combining the two queries, placing one query inside the other query. The inner query (or subquery) returns a value that is used by the outer query (or main query).
Using a subquery is equivalent to performing two sequential queries and using the result of the first query as the search value in the second query.
Subquery Syntax
A subquery is a SELECT statement that is embedded in the clause of another SELECT statement. You can build powerful statements out of simple ones by using subqueries. They can be very useful when you need to select rows from a table with a condition that depends on the data in the table itself.
You can place the subquery in a number of SQL clauses, including the following:
WHERE clause
HAVING clause
FROM clause
In the syntax:
operator includes a comparison condition such as >, =, or IN Note: Comparison conditions fall into two classes: single-row operators (>, =, >=, <, <>, <=) and multiple-row operators (IN, ANY, ALL, EXISTS). The subquery is often referred to as a nested SELECT, sub-SELECT, or inner SELECT statement. The subquery generally executes first, and its output is used to complete the query condition for the main (or outer) query.
Guidelines for Using Subqueries
Enclose subqueries in parentheses. Place subqueries on the right side of the comparison condition for readability. (However, the subquery can appear on either side of the comparison operator.) Use single-row operators with single-row subqueries and multiple- row operators with multiple-row subqueries.
Subqueries can be nested to an unlimited depth in a FROM clause but to "only" 255 levels in a WHERE clause. They can be used in the SELECT list and in the FROM, WHERE, and HAVING clauses of a query.

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

try_now

, , , , , ,

Comments are currently closed.