Click to Rate and Give Feedback
MSDN
MSDN Library
SQL Server
SQL Server 2008
Database Engine
Development
 About the Store.Demographics xml Co...
Other versions are also available for the following:
SQL Server 2008 Books Online
About the Store.Demographics xml Column

Using Adventure Works for illustration, resellers buy products from Adventure Works Cycles and sell them in retail outlets. The usual demographic information for these resellers, such as annual revenue, annual sales, business type, and year opened, is stored in the Demographics column of xml data type in the Store table.

This is a typed xml column. The schemas used for this column can be viewed at this Microsoft Web site. This column uses the AdventureWorks StoreSurvey XML schema.

This is a sample XML instance stored in the Store.Demographics column:

<StoreSurvey xmlns="http://schemas.microsoft.com/sqlserver/2004/07/adventure-works/StoreSurvey">
  <AnnualSales>300000</AnnualSales>
  <AnnualRevenue>30000</AnnualRevenue>
  <BankName>International Bank</BankName>
  <BusinessType>BM</BusinessType>
  <YearOpened>1970</YearOpened>
  <Specialty>Road</Specialty>
  <SquareFeet>7000</SquareFeet>
  <Brands>3</Brands>
  <Internet>T1</Internet>
  <NumberEmployees>2</NumberEmployees>
</StoreSurvey>

Run the following query to find more XML instances:

SELECT Demographics
FROM   Sales.Store
Tags What's this?: Add a tag
Community Content   What is Community Content?
Add new content RSS  Annotations
Processing
© 2008 Microsoft Corporation. All rights reserved. Terms of Use  |  Trademarks  |  Privacy Statement
Page view tracker