Best Quality Microsoft 70-461 Question Online

we provide Approved Microsoft 70-461 question which are the best for clearing 70-461 test, and to get certified by Microsoft Querying Microsoft SQL Server 2012. The 70-461 Questions & Answers covers all the knowledge points of the real 70-461 exam. Crack your Microsoft 70-461 Exam with latest dumps, guaranteed!

Microsoft 70-461 Free Dumps Questions Online, Read and Test Now.

Page: 1 / 19
Total 232 questions Full Exam Access
Question 1
- (Exam Topic 2)
Your database contains a table named Products that has columns named ProductID and Name.
You want to write a query that retrieves data from the Products table sorted by Name listing 15 rows at a time. You need to view rows 31 through 45.
Which Transact-SQL query should you create?
70-461 dumps exhibit
My answer: -
Reference answer: C
Reference analysis:

The OFFSET-FETCH clause provides you with an option to fetch only a window or page of results from the result set. OFFSET-FETCH can be used only with the ORDER BY clause.
Example: Skip first 10 rows from the sorted resultset and return next 5 rows.
SELECT First Name + \' \' + Last Name FROM Employees ORDER BY First Name OFFSET 10 ROWS FETCH NEXT 5 ROWS ONLY;
References: https://technet.microsoft.com/en-us/library/gg699618(v=sql.110).aspx

Question 2
- (Exam Topic 1)
You administer a Microsoft SQL Server 2012 database that has Trustworthy set to On. You create a stored procedure that returns database-level information from Dynamic Management Views. You grant User1 access to execute the stored procedure. You need to ensure that the stored procedure returns the required information when User1 executes the stored procedure. You need to achieve this goal by granting the minimum permissions required. What should you do? (Each correct answer presents a complete solution. Choose all that apply.)
My answer: -
Reference answer: DE
Reference analysis:

None

Question 3
- (Exam Topic 1)
You create the following stored procedure. (Line numbers are included for reference only.)
70-461 dumps exhibit
You need to ensure that the stored procedure performs the following tasks:
70-461 dumps exhibit If a record exists, update the record.
70-461 dumps exhibit If no record exists, insert a new record.
Which four Transact-SQL statements should you insert at line 07? (To answer, move the appropriate statements from the list of statements to the answer area and arrange them in the correct order.)
70-461 dumps exhibit
Solution:
Reference: http://technet.microsoft.com/en-us/library/bb510625.aspx

Does this meet the goal?
My answer: -
Reference answer: A
Reference analysis:

None

Question 4
- (Exam Topic 1)
You develop a Microsoft SQL Server 2012 database that has two tables named SavingAccounts and LoanAccounts. Both tables have a column named AccountNumber of the nvarchar data type.
You use a third table named Transactions that has columns named TransactionId AccountNumber, Amount, and TransactionDate.
You need to ensure that when multiple records are inserted in the Transactions table, only the records that have a valid AccountNumber in the SavingAccounts or LoanAccounts are inserted.
Which Transact-SQL statement should you use?
My answer: -
Reference answer: A
Reference analysis:

None

Question 5
- (Exam Topic 2)
You are developing a Microsoft SQL Server 2012 database for a company. The database contains a table that is defined by the following Transact-SQL statement:
70-461 dumps exhibit
You use the following Transact-SQL script to insert new employee data into the table. Line numbers are included for reference only.
70-461 dumps exhibit
If an error occurs, you must report the error message and line number at which the error occurred and continue processing errors.
You need to complete the Transact-SQL script.
Which Transact-SQL segment should you insert at line 06?
My answer: -
Reference answer: B
Reference analysis:

When the code in the CATCH block finishes, control passes to the statement immediately after the END CATCH statement. Errors trapped by a CATCH block are not returned to the calling application. If any part of the error information must be returned to the application, the code in the CATCH block must do so by using mechanisms such as SELECT result sets or the RAISERROR and PRINT statements.
Reference: TRY...CATCH (Transact-SQL) https://msdn.microsoft.com/en-us/library/ms175976.aspx

Question 6
- (Exam Topic 2)
You develop a stored procedure for a wholesale glass manufacturing company. The stored procedure uses a cursor to read all row-based combinations of the following tables:
70-461 dumps exhibit
You observe that the stored procedure returns results very slowly. You need to improve the execution speed of the stored procedure. Which cursor type should you use?
My answer: -
Reference answer: B
Reference analysis:

FAST_FORWARD specifies a FORWARD_ONLY, READ_ONLY cursor with performance optimizations enabled.
References: https://msdn.microsoft.com/en-us/library/ms180169.aspx

Question 7
- (Exam Topic 2)
You are developing a database that will contain price information.
You need to store the prices that include a fixed precision and a scale of six digits.
Which data type should you use?
My answer: -
Reference answer: B
Reference analysis:

Numeric data types that have fixed precision and scale. decimal[ (p[ , s] )] and numeric[ (p[ , s] )]
where
* p (precision)
The maximum total number of decimal digits that will be stored, both to the left and to the right of the decimal point. The precision must be a value from 1 through the maximum precision of 38. The default precision is 18.
* (scale)
The number of decimal digits that will be stored to the right of the decimal point. Reference: decimal and numeric (Transact-SQL)
https://msdn.microsoft.com/en-us/library/ms187746.aspx

Question 8
- (Exam Topic 1)
You support a database structure shown in the exhibit. (Click the Exhibit button.)
70-461 dumps exhibit
You need to write a query that displays the following details:
70-461 dumps exhibit Total sales made by sales people, year, city, and country
70-461 dumps exhibit Sub totals only at the city level and country level
70-461 dumps exhibit A grand total of the sales amount Which Transact-SQL query should you use?
My answer: -
Reference answer: A
Reference analysis:

Be careful with this question, because on exam can be different options for answer. And none of them is correct: D You should report this question.
Reference:
http://www.grapefruitmoon.net/diving-into-t-sql-grouping-sets/ Reference: http://msdn.microsoft.com/en-us/library/ms177673.aspx

Question 9
- (Exam Topic 1)
You use a Microsoft SQL Server 2012 database that contains two tables named SalesOrderHeader and SalesOrderDetail. The indexes on the tables are as shown in the exhibit. (Click the Exhibit button.)
70-461 dumps exhibit
You write the following Transact-SQL query:
70-461 dumps exhibit
You discover that the performance of the query is slow. Analysis of the query plan shows table scans where the estimated rows do not match the actual rows for SalesOrderHeader by using an unexpected index on SalesOrderDetail.
You need to improve the performance of the query. What should you do?
My answer: -
Reference answer: D
Reference analysis:

References: http://msdn.microsoft.com/en-us/library/ms187348.aspx

Question 10
- (Exam Topic 1)
Your database contains tables named Products and ProductsPriceLog. The Products table contains columns named ProductCode and Price. The ProductsPriceLog table contains columns named ProductCode, OldPrice, and NewPrice.
The ProductsPriceLog table stores the previous price in the OldPrice column and the new price in the NewPrice column.
You need to increase the values in the Price column of all products in the Products table by 5 percent. You also need to log the changes to the ProductsPriceLog table.
Which Transact-SQL query should you use?
My answer: -
Reference answer: A
Reference analysis:

Reference: http://msdn.microsoft.com/en-us/library/ms177564.aspx

Question 11
- (Exam Topic 1)
You have a database named Sales that contains the tables as shown in the exhibit. (Click the Exhibit button.)
70-461 dumps exhibit
You need to create a query that meets the following requirements:
70-461 dumps exhibit References columns by using one-part names only.
70-461 dumps exhibit Groups aggregates only by SalesTerritoryID, and then by ProductID.
70-461 dumps exhibit Orders the results in descending order by SalesTerritoryID and then by ProductID in descending order for both.
Part of the correct T-SQL statement has been provided in the answer area. Provide the complete code.
70-461 dumps exhibit
Solution:
SELECT SalesTerritoryID, ProductID,
AVG(UnitPrice), MAX(OrderQty) MAX(DiscountAmount) FROM Sales.Details
GROUP BY SalesTerritoryID, ProductID
ORDER BY SalesTerritoryID DESC, ProductID DESC

Does this meet the goal?
My answer: -
Reference answer: A
Reference analysis:

None

Question 12
- (Exam Topic 2)
You develop a Microsoft SQL Server database that contains a table named Products. The Products table has columns named ProductId, CategoryId, Name, and Price.
Product prices are often updated as follows:
70-461 dumps exhibit For a single product by a specific value by using the ProductId column
70-461 dumps exhibit For an entire category by a percentage by using the CategoryId column
You need to log the change price to a new table named PriceChange by using the ProductId’ ChangedValue, and ChangedDate columns. You also need to ensure that increases in price are recorded as positive values and decreases in price as negative values.
Which Transact-SQL query should you use?
70-461 dumps exhibit
70-461 dumps exhibit
70-461 dumps exhibit
70-461 dumps exhibit
My answer: -
Reference answer: D
Reference analysis:

None

Question 13
- (Exam Topic 2)
You develop a Microsoft SQL Server database. You design a table to store product information. The table is defined as follows:
70-461 dumps exhibit
You need to meet the following requirements:
70-461 dumps exhibit If a product has a product category value other than “REGULAR”, the product should have a sub-category with a length of two characters.
70-461 dumps exhibit If a product has the product category “REGULAR”, the product may or may not have a sub-category. Which Transact-SQL statement should you use?
70-461 dumps exhibit
My answer: -
Reference answer: C
Reference analysis:

Either the Category column is REGULAR, or it is not REGULAR and the length of the column is exactly 2.

Question 14
- (Exam Topic 2)
Your application contains a stored procedure for each country. Each stored procedure accepts an employee identification number through the @EmpID parameter.
You need to build a single process for each employee that will execute the appropriate stored procedure based on the country of residence.
Which approach should you use?
My answer: -
Reference answer: E
Reference analysis:

SQL Server user-defined functions are routines that accept parameters, perform an action, such as a complex calculation, and return the result of that action as a value. The return value can either be a single scalar value or a result set.

Question 15
- (Exam Topic 1)
You administer a Microsoft SQL Server 2012 database that contains a table named OrderDetail. You discover that the NCI_OrderDetail_CustomerID non-clustered index is fragmented. You need to reduce fragmentation.
You need to achieve this goal without taking the index offline. Which Transact-SQL batch should you use?
My answer: -
Reference answer: B
Reference analysis:

Reference: http://msdn.microsoft.com/en-us/library/ms188388.aspx

Question 16
- (Exam Topic 1)
You use Microsoft SQL Server 2012 to develop a database application.
You create a stored procedure named dbo.ModifyData that can modify rows.
You need to ensure that when the transaction fails, dbo.ModifyData meets the following requirements:
70-461 dumps exhibit Does not return an error
70-461 dumps exhibit Closes all opened transactions
Which Transact-SQL statement should you use?
My answer: -
Reference answer: D
Reference analysis:

None

Question 17
- (Exam Topic 2)
You have a database named Sales that contains the tables as shown in the exhibit. (Click the Exhibit button.)
70-461 dumps exhibit
You need to create a query that returns a list of products from Sales.ProductCatalog. The solution must meet the following requirements:
70-461 dumps exhibit Return rows ordered by descending values in the UnitPrice column.
70-461 dumps exhibit Use the Rank function to calculate the results based on the UnitPrice column.
70-461 dumps exhibit Return the ranking of rows in a column that uses the alias PriceRank.
70-461 dumps exhibit Use two-part names to reference tables.
70-461 dumps exhibit Display the columns in the order that they are defined in the table. The PriceRank column must appear last.
Part of the correct T-SQL statement has been provided in the answer area. Provide the complete code.
70-461 dumps exhibit
Solution:
SELECT CatID, CatName, ProductID, ProdName, UnitPrice, RANK (ORDER BY UnitPrice DESC) OVER () AS PriceRank
FROM Sales.ProductCatalog ORDER BY PriceRank
Reference: RANK (Transact-SQL) https://msdn.microsoft.com/en-us/library/ms176102.aspx

Does this meet the goal?
My answer: -
Reference answer: A
Reference analysis:

None

Question 18
- (Exam Topic 1)
You administer a Microsoft SQL Server database that contains a table named Products.
In a bit column named Discontinued, a value of 1 indicates a product is inactive, and a value of 0 indicates the product is active.
You need to create a view that returns a column with a full product status description. Which expression should you use to define the column?
My answer: -
Reference answer: B
Reference analysis:

The CASE statement evaluates a list of conditions and returns one of multiple possible result expressions. The CASE expression has two formats:
The simple CASE expression compares an expression to a set of simple expressions to determine the result. The searched CASE expression evaluates a set of Boolean expressions to determine the result.
Both formats support an optional ELSE argument.
CASE can be used in any statement or clause that allows a valid expression. References:
https://docs.microsoft.com/en-us/sql/t-sql/language-elements/case-transact-sql?view=sql-server-2017

Question 19
- (Exam Topic 1)
You are developing a database application by using Microsoft SQL Server 2012. An application that uses a database begins to run slowly.
You discover that during reads, the transaction experiences blocking from concurrent updates. You need to ensure that throughout the transaction the data maintains the original version. What should you do?
My answer: -
Reference answer: M
Reference analysis:

None

Question 20
- (Exam Topic 1)
You have a database named Sales that contains the tables shown in the exhibit. (Click the Exhibit button.)
70-461 dumps exhibit
You have an application named Appl. You have a parameter named @Count that uses the int data type. App1 is configured to pass @Count to a stored procedure.
You need to create a stored procedure named usp_Customers for App1 that returns only the number of rows specified by the @Count parameter.
The solution must NOT use BEGIN, END, or DECLARE statements.
Part of the correct Transact-SQL statement has been provided in the answer area. Complete the Transact-SQL statement
70-461 dumps exhibit
Solution:
CREATE PROCEDURE usp_Customers @Count int SELECT TOP(@Count)
Customers.LastName FROM Customers
ORDER BY Customers.LastName

Does this meet the goal?
My answer: -
Reference answer: A
Reference analysis:

None

Question 21
- (Exam Topic 1)
You administer a Microsoft SQL Server database that supports a banking transaction management application. You need to retrieve a list of account holders who live in cities that do not have a branch location.
Which Transact-SQL query or queries should you use? (Each correct answer presents a complete solution. Choose all that apply.)
My answer: -
Reference answer: AB
Reference analysis:

Verified the answers as correct.
Reference: http://msdn.microsoft.com/en-us/library/ms188047.aspx Reference: http://msdn.microsoft.com/en-us/library/ms177682.aspx Reference: http://msdn.microsoft.com/en-us/library/ms173545.aspx

Question 22
- (Exam Topic 1)
You use a Microsoft Azure SQL DataBase instance. The instance contains a table named Customers that has columns named Id, Name, and IsPriority.
You need to create a view named VwPriorityCustomers that:
70-461 dumps exhibit returns rows from Customer that have a value of True in the IsPriority column, and
70-461 dumps exhibit does not allow columns to be altered or dropped in the underlying table.
Which Transact-SQL statement shoul you run?
My answer: -
Reference answer: D
Reference analysis:

SCHEMABINDING binds the view to the schema of the underlying table or tables. When SCHEMABINDING is specified, the base table or tables cannot be modified in a way that would affect the view definition.
References:
https://docs.microsoft.com/en-us/sql/t-sql/statements/create-view-transact-sql?view=sql-server-2017

Question 23
- (Exam Topic 1)
You need to create a cursor that meets the following requirements:
70-461 dumps exhibit Executes as quickly as possible.
70-461 dumps exhibit Reflects all data changes made to the table while scrolling.
Which five Transact-SQL statements should you use to develop the solution? To answer, move the appropriate Transact-SQL segments from the list of Transact-SQL segments to the answer are and arrange them in the correct order.
70-461 dumps exhibit
Solution:
Step 1: Declare variables. Step 2: Open the cursor
Step 3: Fetch the first instance. Step 4: Loop
Step 5: Close and deallocate the cursor
References:
https://docs.microsoft.com/en-us/sql/t-sql/language-elements/declare-cursor-transact-sql?view=sql-server-2017

Does this meet the goal?
My answer: -
Reference answer: A
Reference analysis:

None

Question 24
- (Exam Topic 1)
You have a database named Sales that contains the tables shown in the exhibit. (Click the Exhibit button).
70-461 dumps exhibit
You need to create a query for a report. The query must meet the following requirements:
70-461 dumps exhibit NOT use object delimiters.
70-461 dumps exhibit Use the first initial of the table as an alias.
70-461 dumps exhibit Return the most recent order date for each customer.
70-461 dumps exhibit Retrieve the last name of the person who placed the order. The solution must support the ANSI SQL-99 standard.
Part of the correct T-SQL statement has been provided in the answer area. Provide the complete code.
70-461 dumps exhibit
Solution:
SELECT C.LastName,
MAX(O.OrderDate) AS MostRecentOrderDate FROM Customers AS C INNER JOIN Orders AS O ON C.CustomerID=O.CustomerID
GROUP BY C.Lastname
ORDER BY MAX (O.OrderDate) DESC

Does this meet the goal?
My answer: -
Reference answer: A
Reference analysis:

None

Question 25
- (Exam Topic 2)
You have a database application that uses Microsoft SQL Server 2012. You have a query named Query1 that returns four columns from a frequently updated table that has a clustered index. Three of the columns are referenced in the WHERE clause of the query. The three columns are part of a non-clustered index. The fourth column is not referenced in the WHERE clause.
Users report that the application begins to run slowly. You determine that the root cause for the performance issue is Query1.
You need to optimize the statement. What should you do?
My answer: -
Reference answer: K
Reference analysis:

SET SHOWPLAN_XML (Transact-SQL) causes SQL Server not to execute Transact-SQL statements. Instead, SQL Server returns detailed information about how the statements are going to be executed in the form of a well-defined XML document
Incorrect:
Not F: Columnstore indexes in the SQL Server Database Engine can be used to significantly speed-up the processing time of common data warehousing queries. Typical data warehousing workloads involve summarizing large amounts of data. But in this question the query is run on a table that is updated frequently, not a warehousing table.
Reference: SET SHOWPLAN_XML (Transact-SQL) https://msdn.microsoft.com/en-us/library/ms187757.aspx

Question 26
- (Exam Topic 1)
You have a database that contains the tables shown in the exhibit. (Click the Exhibit button.)
70-461 dumps exhibit
You deploy a new server that has SQL Server 2012 installed. You need to create a table named Sales.OrderDetails on the new server. Sales.OrderDetails must meet the following requirements:
70-461 dumps exhibit Write the results to a disk.
70-461 dumps exhibit Contain a new column named LineItemTotal that stores the product of ListPrice and Quantity for each row.
70-461 dumps exhibit The code must NOT use any object delimiters.
The solution must ensure that LineItemTotal is stored as the last column in the table. Which code segment should you use?
To answer, type the correct code in the answer area.
Solution:
CREATE TABLE Sales.OrderDetails ( ListPrice money not null,
Quantity int not null,
LineItemTotal as (ListPrice * Quantity) PERSISTED)
Reference: http://msdn.microsoft.com/en-us/library/ms174979.aspx
Reference: http://technet.microsoft.com/en-us/library/ms188300.aspx

Does this meet the goal?
My answer: -
Reference answer: A
Reference analysis:

None

Page: 1 / 19
Total 232 questions Full Exam Access