Share via


關於 Store.Demographics xml 資料行

使用 AdventureWorks2008R2 範例資料庫來說明零售商購買 Adventure Works Cycles 的產品,並將它們賣到零售商店。這些零售商的人口統計資訊 (例如年收入、年銷售額、商業類型以及已開業年數) 是儲存在 Store 資料表中 xml 資料類型的 Demographics 資料行中。

這是 xml 類型的資料行。您可以在此 Microsoft 網站檢視此資料行所使用的結構描述。此資料行使用 StoreSurvey XML 結構描述。

XML 執行個體範例

這是儲存在 Store.Demographics 資料行中的 XML 執行個體範例:

<StoreSurvey xmlns="https://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>

執行下列查詢以尋找更多的 XML 執行個體:

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

請參閱

概念