PrepAway - Latest Free Exam Questions & Answers

What is the result of the following XQuery expression?

Given the following table and XML data stored in the CONTACTINFO column:
CREATE TABLE clients(
id INT PRIMARY KEY NOT NULL,
name VARCHAR(50),
status VARCHAR(10),
contactinfo XML)
<Client>
<Address>
<street>25 EastCreek</street>
<city>Toronto</city>
<prov-state>Ontario</prov-state>
<pcode-zip>M8X-3T6</pcode-zip>
</Address>
<phone>
<work>4165551358</work>
<home>9051112222</home>
<fax>9051112222</fax>
</phone>
<preferredcontact>by fax</preferredcontact>
</Client>

What is the result of the following XQuery expression?
for $y in db2-fn:xmlcolumn(‘CLIENTS.CONTACTINFO’)/Client//fax return $y

PrepAway - Latest Free Exam Questions & Answers

A.
9051112222

B.
<fax>9051112222</fax>

C.
No results because there is no <fax> child element of <Client>

D.
No results because theXQuery expression is not a valid FLWOR expression

One Comment on “What is the result of the following XQuery expression?


Leave a Reply