Download Querying Data with Transact-SQL.70-761.Prep4Sure.2018-06-16.91q.vcex

Vendor: Microsoft
Exam Code: 70-761
Exam Name: Querying Data with Transact-SQL
Date: Jun 16, 2018
File Size: 13 MB

How to open VCEX files?

Files with VCEX extension can be opened by ProfExam Simulator.

ProfExam Discount

Demo Questions

Question 1
Note: This question is part of a series of questions that present the same scenario. Each question in the series contains a unique solution that might meet the stated goals. Some question sets might have more than one correct solution, while others might not have a correct solution.
After you answer a question in this section. You will NOT be able to return to it. As a result, these questions will not appear in the review screen. 
You create a table named Customer by running the following Transact-SQL statement:
  
You must insert the following data into the Customer table:
  
 
You need to ensure that both records are inserted or neither record is inserted. 
Solution: You run the following Transact-SQL statement:
  
Does the solution meet the goal?
  1. Yes
  2. No
Correct answer: B
Explanation:
As there are two separate INSERT INTO statements we cannot ensure that both or neither records are inserted.
As there are two separate INSERT INTO statements we cannot ensure that both or neither records are inserted.
Question 2
Note: This question is part of a series of questions that present the same scenario. Each question in the series contains a unique solution that might meet the stated goals. Some question sets might have more than one correct solution, while others might not have a correct solution.
After you answer a question in this section. You will NOT be able to return to it. As a result, these questions will not appear in the review screen. 
You create a table named Customer by running the following Transact-SQL statement:
  
 
You must insert the following data into the Customer table:
  
You need to ensure that both records are inserted or neither record is inserted. 
Solution: You run the following Transact-SQL statement:
  
 
Does the solution meet the goal?
  1. Yes
  2. No
Correct answer: B
Explanation:
As there are two separate INSERT INTO statements we cannot ensure that both or neither records are inserted.
As there are two separate INSERT INTO statements we cannot ensure that both or neither records are inserted.
Question 3
Note: This question is part of a series of questions that present the same scenario. Each question in the series contains a unique solution that might meet the stated goals. Some question sets might have more than one correct solution, while others might not have a correct solution.
After you answer a question in this section. You will NOT be able to return to it. As a result, these questions will not appear in the review screen. 
You create a table named Customer by running the following Transact-SQL statement:
  
You must insert the following data into the Customer table:
  
 
You need to ensure that both records are inserted or neither record is inserted. 
Solution: You run the following Transact-SQL statement:
  
 
Does the solution meet the goal?
  1. Yes
  2. No
Correct answer: A
Explanation:
With the INSERT INTO..VALUES statement we can insert both values with just one statement. This ensures that both records or neither is inserted. References:https://msdn.microsoft.com/en-us/library/ms174335.aspx
With the INSERT INTO..VALUES statement we can insert both values with just one statement. This ensures that both records or neither is inserted. 
References:https://msdn.microsoft.com/en-us/library/ms174335.aspx
Question 4
Note: This question is part of a series of questions that present the same scenario. Each question in the series contains a unique solution that might meet the stated goals. Some question sets might have more than one correct solution, while others might not have a correct solution.
After you answer a question in this section. You will NOT be able to return to it. As a result, these questions will not appear in the review screen. 
You have a database that tracks orders and deliveries for customers in North America. The database contains the following tables:
Sales.Customers 
  
Application.Cities 
  
Sales.CustomerCategories 
  
The company’s development team is designing a customer directory application. The application must list customers by the area code of their phone number. The area code is defined as the first three characters of the phone number. 
The main page of the application will be based on an indexed view that contains the area and phone number for all customers. 
You need to return the area code from the PhoneNumber field. 
Solution: You run the following Transact-SQL statement:
  
Does the solution meet the goal?
  1. Yes
  2. No
Correct answer: B
Explanation:
The function should return nvarchar(10) and not a TABLE. References: https://sqlstudies.com/2014/08/06/schemabinding-what-why/
The function should return nvarchar(10) and not a TABLE. 
References: https://sqlstudies.com/2014/08/06/schemabinding-what-why/
Question 5
Note: This question is part of a series of questions that present the same scenario. Each question in the series contains a unique solution that might meet the stated goals. Some question sets might have more than one correct solution, while others might not have a correct solution.
After you answer a question in this section. You will NOT be able to return to it. As a result, these questions will not appear in the review screen. 
You have a database that tracks orders and deliveries for customers in North America. The database contains the following tables:
Sales.Customers 
  
Application.Cities 
  
Sales.CustomerCategories 
  
 
The company’s development team is designing a customer directory application. The application must list customers by the area code of their phone number. The area code is defined as the first three characters of the phone number. 
The main page of the application will be based on an indexed view that contains the area and phone number for all customers. 
You need to return the area code from the PhoneNumber field. 
Solution: You run the following Transact-SQL statement:
  
Does the solution meet the goal?
  1. Yes
  2. No
Correct answer: B
Explanation:
As the result of the function will be used in an indexed view we should use schemabinding. References: https://sqlstudies.com/2014/08/06/schemabinding-what-why/
As the result of the function will be used in an indexed view we should use schemabinding. 
References: https://sqlstudies.com/2014/08/06/schemabinding-what-why/
Question 6
Note: This question is part of a series of questions that present the same scenario. Each question in the series contains a unique solution that might meet the stated goals. Some question sets might have more than one correct solution, while others might not have a correct solution.
After you answer a question in this section. You will NOT be able to return to it. As a result, these questions will not appear in the review screen. 
You have a database that tracks orders and deliveries for customers in North America. The database contains the following tables:
Sales.Customers 
  
Application.Cities 
  
Sales.CustomerCategories 
  
 
The company’s development team is designing a customer directory application. The application must list customers by the area code of their phone number. The area code is defined as the first three characters of the phone number. 
The main page of the application will be based on an indexed view that contains the area and phone number for all customers. 
You need to return the area code from the PhoneNumber field. 
Solution: You run the following Transact-SQL statement:
  
Does the solution meet the goal?
  1. Yes
  2. No
Correct answer: B
Explanation:
We need SELECT TOP 1 @areacode =.. to ensure that only one value is returned.
We need SELECT TOP 1 @areacode =.. to ensure that only one value is returned.
Question 7
Note: This question is part of a series of questions that use the same scenario. For your convenience, the scenario is repeated in each question. Each question presents a different goal and answer choices, but the text of the scenario is exactly the same in each question in this series.
You query a database that includes two tables: Project and Task. The Project table includes the following columns:
  
The Task table includes the following columns:
  
 
You plan to run the following query to update tasks that are not yet started:
UPDATE Task SET StartTime = GETDATE() WHERE StartTime IS NULL 
You need to return the total count of tasks that are impacted by this UPDATE operation, but are not associated with a project. 
What set of Transact-SQL statements should you run?
A.
 
B.
 
C.
 
D.
 
  1. Option A
  2. Option B
  3. Option C
  4. Option D
Correct answer: B
Explanation:
The WHERE clause of the third line should be WHERE ProjectID IS NULL, as we want to count the tasks that are not associated with a project.
The WHERE clause of the third line should be WHERE ProjectID IS NULL, as we want to count the tasks that are not associated with a project.
Question 8
You need to create an indexed view that requires logic statements to manipulate the data that the view displays. 
Which two database objects should you use? Each correct answer presents a complete solution.
  1. a user-defined table-valued function
  2. a CRL function
  3. a stored procedure
  4. a user-defined scalar function
Correct answer: AC
Explanation:
You can create a database object inside an instance of SQL Server that is programmed in an assembly created in the Microsoft .NET Framework common language runtime (CLR). Database objects that can leverage the rich programming model provided by the common language runtime include aggregate functions, functions, stored procedures, triggers, and types.
You can create a database object inside an instance of SQL Server that is programmed in an assembly created in the Microsoft .NET Framework common language runtime (CLR). Database objects that can leverage the rich programming model provided by the common language runtime include aggregate functions, functions, stored procedures, triggers, and types.
Question 9
You have a database that includes the tables shown in the exhibit. (Click the exhibit button.) 
  
You need to create a list of all customers, the order ID for the last order that the customer placed, and the date that the order was placed. For customers who have not placed orders, you must substitute a zero for the order ID and 01/01/1990 for the date. 
Which Transact-SQL statement should you run?
A.
 
B.
 
C.
 
D.
 
  1. Option A
  2. Option B
  3. Option C
  4. Option D
Correct answer: A
Explanation:
ISNULL Syntax: ISNULL ( check_expression , replacement_value ) author:"Luxemburg, Rosa"The ISNULL function replaces NULL with the specified replacement value. The value of check_expression is returned if it is not NULL; otherwise, replacement_value is returned after it is implicitly converted to the type of check_expression. References: https://msdn.microsoft.com/en-us/library/ms184325.aspx
ISNULL Syntax: ISNULL ( check_expression , replacement_value ) author:"Luxemburg, Rosa"
The ISNULL function replaces NULL with the specified replacement value. The value of check_expression is returned if it is not NULL; otherwise, replacement_value is returned after it is implicitly converted to the type of check_expression. 
References: https://msdn.microsoft.com/en-us/library/ms184325.aspx
Question 10
You have a database that contains the following tables:
Customer 
  
CustomerAudit 
  
 
Where the value of the CustomerID column equals 3, you need to update the value of the CreditLimit column to 1000 for the customer. You must ensure that the change to the record in the Customer table is recorded on the CustomerAudit table. 
Which Transact-SQL statement should you run?
A.
 
B.
 
C.
 
D.
 
  1. Option A
  2. Option B
  3. Option C
  4. Option D
Correct answer: D
Explanation:
The OUTPUT Clause returns information from, or expressions based on, each row affected by an INSERT, UPDATE, DELETE, or MERGE statement. These results can be returned to the processing application for use in such things as confirmation messages, archiving, and other such application requirements. The results can also be inserted into a table or table variable. Additionally, you can capture the results of an OUTPUT clause in a nested INSERT, UPDATE, DELETE, or MERGE statement, and insert those results into a target table or view. Note: If the column modified by the .RITE clause is referenced in an OUTPUT clause, the complete value of the column, either the before image in deleted.column_name or the after image in inserted.column_name, is returned to the specified column in the tablevariable.Incorrect Answers:C: The deleted.Creditlimit should be inserted in the second column, the OldCreditLimit column, not the third column.References: https://msdn.microsoft.com/en-us/library/ms177564.aspx
The OUTPUT Clause returns information from, or expressions based on, each row affected by an INSERT, UPDATE, DELETE, or MERGE statement. These results can be returned to the processing application for use in such things as confirmation messages, archiving, and other such application requirements. The results can also be inserted into a table or table variable. Additionally, you can capture the results of an OUTPUT clause in a nested INSERT, UPDATE, DELETE, or MERGE statement, and insert those results into a target table or view. 
Note: If the column modified by the .RITE clause is referenced in an OUTPUT clause, the complete value of the column, either the before image in deleted.column_name or the after image in inserted.column_name, is returned to the specified column in the tablevariable.
Incorrect Answers:
C: The deleted.Creditlimit should be inserted in the second column, the OldCreditLimit column, not the third column.
References: https://msdn.microsoft.com/en-us/library/ms177564.aspx
HOW TO OPEN VCE FILES

Use VCE Exam Simulator to open VCE files
Avanaset

HOW TO OPEN VCEX AND EXAM FILES

Use ProfExam Simulator to open VCEX and EXAM files
ProfExam Screen

ProfExam
ProfExam at a 20% markdown

You have the opportunity to purchase ProfExam at a 20% reduced price

Get Now!