SIMULATION
You have a SQL Server database that contains all of the sales data for your company.
You need to create a query that returns the customers who represent the top five percent of the total actual sales.
Part of the correct Transact-SQL has been provided in the answer area below. Enter the code in the answer area that resolves the problem and meets the stated goals or requirements. You can add code within the code that has been
provided as well as below it.


Use the Check Syntax button to verify your work. Any syntax or spelling errors will be reported by line and character position.
You have a database that contains a table named Customer. The customer table contains a column named LastName that has a column definition of varchar(50).
An application named App1 reads from the table frequently. You need to change the column definition to nvarchar(100). The solution must minimize the amount of time it takes for App1 to read the data. Which statement should you execute?

ABC.com has a SQL Server 2012 database infrastructure that has a database named ComDB.
You have created a view using the following Transact-SQL code:
CREATE VIEW ABCCommunications
(Type, CompanyID, CompanyName, Location, ContactName, Email, Phone)
AS
SELECT 'Clients' AS Type, CompanyID, CompanyName, Location, ContactName, Email, Phone
FROM CommList
WHERE Relation = 'Client'
SELECT 'Partners' AS Type, CompanyID, CompanyName, Location, ContactName, Email, Phone
FROM CommList
WHERE Relation = 'Partner'
SELECT 'Guests' AS Type, CompanyID, CompanyName, Location, ContactName, Email, Phone
FROM CommList
WHERE Relation = 'Guests'
GO
You want the view to be used to edit all columns except the CompanyID, CompanyName and Location columns.
What should you implement on the view?
A. You should consider implementing an AFTER UPDATE trigger.You administer a Microsoft SQL Server 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.)
A. Create a SQL Server login that has VIEW SERVER STATE permissions. Create an application role and a secured password for the role.You administer a Microsoft SQL Server 2012 database named ContosoDb. Tables are defined as shown in the exhibit.

You need to display rows from the Orders table for the Customers row having the Customerld value set to 1 in the following XML format.

Which Transact-SQL query should you use?
A. SELECT OrderId, OrderDate, Amount, Name, Country FROM Orders INNER JOINCustomers ON Orders.CustomerId = Customers-CustomerId WHERE Customers.CustomerId = 1 FOR XML RAWYou 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?
A. CREATE TRIGGER TrgValidateAccountNumber ON Transactions INSTEAD OF INSERT AS BEGIN INSERT INTO Transactions SELECT TransactionID,AccountNumber,Amount,TransactionDate FROM inserted WHERE AccountNumber IN (SELECT AccountNumber FROM LoanAccounts UNION SELECT AccountNumber FROM SavingAccounts) ENDYou create a table by using the following Transact-SQL Statement:
You need to return a result set that has a single column named DisplayInformation. The result set must contain the Name value if the Name value is NOT NULL, otherwise the result set must contain the SubName value.
Part of the correct Transact-SQL has been provided in the answer area below. Enter the code in the answer area that resolves the problem and meets the stated goals or requirements. You can add code within the code that has been
provided as well as below it.



Use the Check Syntax button to verify your work. Any syntax or spelling errors will be reported by line and character position.
You use a Microsoft SQL Server database.
You want to create a table to store files.
You need to ensure that the following requirements are met:
The files must include information about the directory structure.
The files must be accessible in SQL Server.
The files must be in a folder that is accessible directly by using Windows Explorer.
Which Transact-SQL statement should you run?

Which of the following are true about the SET QUOTED_IDENTIFIER statement? (Choose all that apply.)
A. When set to ON, QUOTED_IDENTIFIER allows you to use double quotation marks to delimit T-SQL identifiers such as table and column names.What is the row locator when a table is stored as a balanced tree?
A. RID.Nowadays, the certification exams become more and more important and required by more and more enterprises when applying for a job. But how to prepare for the exam effectively? How to prepare for the exam in a short time with less efforts? How to get a ideal result and how to find the most reliable resources? Here on Vcedump.com, you will find all the answers. Vcedump.com provide not only Microsoft exam questions, answers and explanations but also complete assistance on your exam preparation and certification application. If you are confused on your 70-461 exam preparations and Microsoft certification application, do not hesitate to visit our Vcedump.com to find your solutions here.