What is the result?

You are a database developer on an instance of SQL Server 2008. You execute the following Transact-SQL:
DECLARE @iHndl int;
DECLARE @XmlDoc nvarchar(4000);
SET @XmlDoc = N’
<Exams>
<Exam ID="70-451" Desc="PRO: Designing Database Solutions and Data Access Using Microsoft SQL Server 2008">
<Obj ObjDesc="Designing a Database Strategy" />
<Obj ObjDesc="Designing Database Tables" />
<Obj ObjDesc="Designing Programming Objects" />
<Obj ObjDesc="Designing a Transaction and Concurrency Strategy" />
<Obj ObjDesc="Designing an XML Strategy" />
<Obj ObjDesc="Designing Queries for Performance" />
<Obj ObjDesc="Designing a Database for Optimal Performance" />
</Exam>
<Exam ID="70-433" Desc="TS: Microsoft SQL Server 2008, Database Development">
<Obj ObjDesc="Implementing Tables and Views" />
<Obj ObjDesc="Implementing Programming Objects" />
<Obj ObjDesc="Working with Query Fundamentals" />
<Obj ObjDesc="Applying Additional Query Techniques" />
<Obj ObjDesc="Working with Additional SQL Server Components" />
<Obj ObjDesc="Working with XML Data" />
<Obj ObjDesc="Gathering Performance Information" />
</Exam>
</Exams>

EXEC sp_xml_preparedocument @iHndl OUTPUT, @XmlDoc;
SELECT * FROM OPENXML (@iHndl, ‘/Exams/Exam/Obj’, 1) WITH (ExamID varchar(10) ‘../@ID’, ObjDesc varchar(100));
EXEC sp_xml_removedocument @iHndl;
What is the result?
A. The query returns output in XML format containing the exam ID and the objective description.
B. The query returns output in a tabular result set containing the exam ID and the objective description.
C. The query returns output in tabular format containing the exam ID, the exam description, and the objective description.
D. The query generates an error because the FROM clause is incorrect.

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.