Which three Transact-SQL statements should you use?

You are a database developer for your organization. You have an application hosted on Microsoft SQL Server 2008 R2. One of the tables in the application database has the following definition:
CREATE TABLE XMLData(XMLPage xml NOT NULL)
No indexes, keys, or constraints are defined along with the table. The table currently contains more than one million entries.
An example of the XML data is shown below:
Company
<Employee Name = "Mark" = "Department Finance"/>
<Employee Name = "Peter" = "Department Sales"/>
<Employee Name = "Susan" = "Department Facilities"/>Company
A stored procedure is executed in the application. The stored procedure has the following definition:
CREATE PROCEDURE p_GetFinanceUser(@Name varchar(20))
AS SELECT Name = Company.Employee.value(‘@Name’,’varchar(20)’), Department = Company.Employee.value(‘@Department’,’varchar(20)’)
FROM XMLData cCROSS
APPLY XMLPage.nodes(‘/Company/Employee’) Department(Employee)
WHERE Company.Employee.exist(‘@Department[.="Finance"]’) = 1
Users report that the response time of the stored procedure has decreased. You need to ensure that the response time of the stored procedure is improved.
Which three Transact-SQL statements should you use? (To answer, move the appropriate statements from the list of statements to the answer area and arrange them in the correct order.)
Build List and Reorder:


microsoft-exams

Leave a Reply

Your email address will not be published. Required fields are marked *


The reCAPTCHA verification period has expired. Please reload the page.