Database Reference
In-Depth Information
Figure 11-59(a) shows the query in the Microsoft SQL Server Management Studio, and
Figure 11-59(b) shows the full results in a tabbed window. Figure 11-59(c) shows partial results
in an XML document (this is a very long XML document).
Figure 11-60(a) shows an XML Schema document for this SQL statement, and a graphi-
cal view of it is shown in Figure 11-60(b). According to the XML Schema in Figure 11-60(b), a
CUSTOMER has from zero to unlimited TRANS elements, a TRANS element has exactly one
WORK element, and a WORK element has exactly one ARTIST element.
Figure 11-59
FOr XML aUtO, ELEMENtS
Displaying Customer
Purchases
The SQL FOR XML
AUTO, ELEMENTS
query
The SQL FOR XML
AUTO, ELEMENTS
query results—click
this cell to display the
results in a separate
window
(a) FOr XML aUtO, ELEMENtS Query
The SQL FOR XML
AUTO, ELEMENTS
query results
(b) FOr XML aUtO, ELEMENtS results in the Microsoft SQL Server
Management Studio
Search WWH ::




Custom Search