XML数据类型是sql2005率先引入的。
1、定义XML数据的列
CREATE TABLE [Production].[ProductModel]( [ProductModelID] [int] IDENTITY(1,1) NOT NULL,[Name] [dbo].[Name] NOT NULL,--[CatalogDescription]表中的格式 [CatalogDescription] [xml](CONTENT [Production].[ProductDescriptionSchemaCollection]) NULL,[Instructions] [xml](CONTENT [Production].[ManuInstructionsSchemaCollection]) NULL,[rowguid] [uniqueidentifier] ROWGUIDCOL NOT NULL,[ModifiedDate] [datetime] NOT NULL,CONSTRAINT [PK_ProductModel_ProductModelID] PRIMARY KEY CLUSTERED ( [ProductModelID] ASC )WITH (PAD_INDEX = OFF,STATISTICS_NORECOMPUTE = OFF,IGNORE_DUP_KEY = OFF,ALLOW_ROW_LOCKS = ON,ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] ) ON [PRIMARY]2、XML模式集合 原文链接:https://www.f2er.com/xml/293696.html