[2016-June-NEW]1Z0-051 Dumps VCE 303Q from Braindump2go Updated for Free Downloading[NQ61-NQ70]

2016 June Oracle Official: 1Z0-051: Oracle Database 11g: SQL Fundamentals I Exam Questions New Updated Today! Braindump2go.com Offers 1Z0-051 PDF and VCE Dumps 303q for Free Downloading!

NEW QUESTION 61 – NEW QUESTION 70:

QUESTION 61
View the Exhibit and examine the structure of ORDERS and CUSTOMERS tables.
There is only one customer with the cust_last_name column having value Roberts.
Which INSERT statement should be used to add a row into the ORDERS table for the customer whose CUST_LAST_NAME is Roberts and CREDIT_LIMIT is 600?
 

A.    INSERT INTO orders
VALUES (1,’10-mar-2007′, ‘direct’,
(SELECT customer_id
FROM customers
WHERE cust_last_name=’Roberts’ AND
credit_limit=600), 1000);
B.    INSERT INTO orders (order_id,order_date,order_mode,
(SELECT customer_id
FROM customers
WHERE cust_last_name=’Roberts’ AND
credit_limit=600),order_total)
VALUES(1,’10-mar-2007′, ‘direct’, &&customer_id, 1000);
C.    INSERT INTO(SELECT o.order_id, o.order_date,o.order_mode,c.customer_id, o.order_total
FROM orders o, customers c
WHERE o.customer_id = c.customer_id
AND c.cust_last_name=’Roberts’ ANDc.credit_limit=600 )
VALUES (1,’10-mar-2007′, ‘direct’,(SELECT customer_id
FROM customers
WHERE cust_last_name=’Roberts’ AND
credit_limit=600), 1000);
D.    INSERT INTO orders (order_id,order_date,order_mode,
(SELECT customer_id
FROM customers
WHERE cust_last_name=’Roberts’ AND
credit_limit=600),order_total)
VALUES(1,’10-mar-2007′, ‘direct’, &customer_id, 1000);

Answer: A

QUESTION 62
View the Exhibit and examine the structure of the PRODUCTS, SALES, and SALE_SUMMARY tables.
SALE_VW is a view created using the following command :
SQL>CREATE VIEW sale_vw AS
SELECT prod_id, SUM(quantity_sold) QTY_SOLD
FROM sales GROUP BY prod_id;
You issue the following command to add a row to the SALE_SUMMARY table :
SQL>INSERT INTO sale_summary
SELECT prod_id, prod_name, qty_sold FROM sale_vw JOIN products
USING (prod_id) WHERE prod_id = 16;
What is the outcome?

A.    It executes successfully.
B.    It gives an error because a complex view cannot be used to add data into the SALE_SUMMARY table.
C.    It gives an error because the column names in the subquery and the SALE_SUMMARY table do not match.
D.    It gives an error because the number of columns to be inserted does not match with the number of
columns in the SALE_SUMMARY table.

Answer: D

QUESTION 63
View the exhibit and examine the description for the SALES and CHANNELS tables.
You issued the following SQL statement to insert a row in the SALES table:
INSERT INTO sales VALUES
(23, 2300, SYSDATE, (SELECT channel_id
FROM channels
WHERE channel_desc=’Direct Sales’), 12, 1, 500);
Which statement is true regarding the execution of the above statement?
 

A.    The statement will execute and the new row will be inserted in the SALES table.
B.    The statement will fail because subquery cannot be used in the VALUES clause.
C.    The statement will fail because the VALUES clause is not required with subquery.
D.    The statement will fail because subquery in the VALUES clause is not enclosed with in single
quotation marks .

Answer: A

QUESTION 64
View the Exhibit and examine the description for the CUSTOMERS table.
You want to update the CUST_CREDIT_LIMIT column to NULL for all the customers, where
CUST_INCOME_LEVEL has NULL in the CUSTOMERS table.
Which SQL statement will accomplish the task?
 

A.    UPDATE customers
SET cust_credit_limit = NULL
WHERE CUST_INCOME_LEVEL = NULL;
B.    UPDATE customers
SET cust_credit_limit = NULL
WHERE cust_income_level IS NULL;
C.    UPDATE customers
SET cust_credit_limit = TO_NUMBER(NULL)
WHERE cust_income_level = TO_NUMBER(NULL);
D.    UPDATE customers
SET cust_credit_limit = TO_NUMBER(‘ ‘,9999)
WHERE cust_income_level IS NULL;

Answer: B

QUESTION 65
View the Exhibit and examine the description for the CUSTOMERS table.
You want to update the CUST_INCOME_LEVEL and CUST_CREDIT_LIMIT columns for the customer with the CUST_ID 2360.
You want the value for the CUST_INCOME_LEVEL to have the same value as that of the customer with the CUST_ID 2560 and the CUST_CREDIT_LIMIT to have the same value as that of the customer with CUST_ID 2566.
Which UPDATE statement will accomplish the task?
 

A.    UPDATE customers
SET cust_income_level = (SELECT cust_income_level
FROM customers
WHERE cust_id = 2560),
cust_credit_limit = (SELECT cust_credit_limit
FROM customers
WHERE cust_id = 2566)
WHERE cust_id=2360;
B.    UPDATE customers
SET (cust_income_level,cust_credit_limit) = (SELECT
cust_income_level, cust_credit_limit
FROM customers
WHERE cust_id=2560 OR cust_id=2566)
WHERE cust_id=2360;
C.    UPDATE customers
SET (cust_income_level,cust_credit_limit) = (SELECT
cust_income_level, cust_credit_limit
FROM customers
WHERE cust_id IN(2560, 2566)
WHERE cust_id=2360;
D.    UPDATE customers
SET (cust_income_level,cust_credit_limit) = (SELECT
cust_income_level, cust_credit_limit
FROM customers
WHERE cust_id=2560 AND cust_id=2566)
WHERE cust_id=2360;

Answer: A
Explanation:
Updating Two Columns with a Subquery
You can update multiple columns in the SET clause of an UPDATE statement by writing multiple subqueries. The syntax is as follows:
UPDATE table
SET column =
(SELECT column
FROM table
WHERE condition)
[ ,
column =
(SELECT column
FROM table
WHERE condition)]
[WHERE condition ] ;

QUESTION 66
View the Exhibit and examine the structures of the EMPLOYEES and DEPARTMENTS tables.
You want to update the EMPLOYEES table as follows:4 ? 4;
-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 location_id 2100 to 1.1 times the average salary of their department.
-Set the employees’ commission in location_id 2100 to 1.5 times the average commission of their department.
You issue the following command:
SQL>UPDATE employees
SET department_id =
(SELECT department_id
FROM departments
WHERE location_id = 2100),
(salary, commission) =
(SELECT 1.1*AVG(salary), 1.5*AVG(commission)
FROM employees, departments
WHERE departments.location_id IN(2900,2700,2100))
WHERE department_id IN
(SELECT department_id
FROM departments
WHERE location_id = 2900
OR location_id = 2700)
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, COMMISION) cannot be specified together
in an UPDATE statement.

Answer: B

QUESTION 67
Evaluate the following DELETE statement:
DELETE FROM sales;
There are no other uncommitted transactions on the SALES table.
Which statement is true about the DELETE statement?

A.    It would not remove the rows if the table has a primary key.
B.    It removes all the rows as well as the structure of the table.
C.    It removes all the rows in the table and deleted rows can be rolled back.
D.    It removes all the rows in the table and deleted rows cannot be rolled back.

Answer: C

QUESTION 68
Which two statements are true regarding the DELETE and TRUNCATE commands? (Choose two.)

A.    DELETE can be used to remove only rows from only one table at a time.
B.    DELETE can be used to remove only rows from multiple tables at a time.
C.    DELETE can be used only on a table that is a parent of a referential integrity constraint.
D.    DELETE can be used to remove data from specific columns as well as complete rows.
E.    DELETE and TRUNCATE can be used on a table that is a parent of a referential integrity constraint
having ON DELETE rule .

Answer: AE
Explanation:
Transactions, consisting of INSERT, UPDATE, and DELETE (or even MERGE) commands can be made permanent (with a COMMIT) or reversed (with a ROLLBACK). A TRUNCATE command, like any other DDL command, is immediately permanent: it can never be reversed.
The Transaction Control Statements
A transaction begins implicitly with the first DML statement. There is no command to explicitly start a transaction. The transaction continues through all subsequent DML statements issued by the session. These statements can be against any number of tables:
a transaction is not restricted to one table. It terminates (barring any of the events listed in the previous section) when the session issues a COMMIT or ROLLBACK command.
The SAVEPOINT command can be used to set markers that will stage the action of a ROLLBACK, but the same transaction remains in progress irrespective of the use of SAVEPOINT
Explicit Transaction Control Statements
You can control the logic of transactions by using the COMMIT, SAVEPOINT, and ROLLBACK statements.
Note: You cannot COMMIT to a SAVEPOINT. SAVEPOINT is not ANSI-standard SQL.
 
untitled

QUESTION 69
View the Exhibit and examine the structure of CUSTOMERS and SALES tables.
Evaluate the following SQL statement:
 
Which statement is true regarding the execution of the above UPDATE statement?
 

A.    It would not execute because two tables cannot be used in a single UPDATE statement.
B.    It would not execute because the SELECT statement cannot be used in place of the table name.
C.    It would execute and restrict modifications to only the columns specified in the SELECT statement.
D.    It would not execute because a subquery cannot be used in the WHERE clause of an UPDATE statement.

Answer: C
Explanation:
One UPDATE statement can change rows in only one table, but it can change any number of rows in that table.

QUESTION 70
Which three statements/commands would cause a transaction to end? (Choose three.)

A.    COMMIT
B.    SELECT
C.    CREATE
D.    ROLLBACK
E.    SAVEPOINT

Answer: ACD


2016 Valid Oracle 1Z0-051 Exam Study Materials:

1.| Latest 1Z0-051 PDF and VCE Dumps 303Q&As from Braindump2go: http://www.braindump2go.com/1z0-051.html [100% Exam Pass Guaranteed!]

2.| NEW 1Z0-051 Exam Questions and Answers: https://drive.google.com/folderview?id=0B75b5xYLjSSNVGxLT202clFMbjA&usp=sharing

 

MORE Practice is the Most Important IF You want to PASS 1Z0-051 Exam 100%!
————— Braindump2go.com
————— Pass All IT Exams at the first Try!