About the Store.Demographics xml Column

About the Store.Demographics xml Column

SQL Server 2008 R2

Using the AdventureWorks2008R2 sample database 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 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">
  <BankName>International Bank</BankName>

Run the following query to find more XML instances:

USE AdventureWorks2008R2;
SELECT Demographics
FROM   Sales.Store
WHERE Demographics IS NOT NULL;

Community Additions

© 2016 Microsoft