为什么XML专栏不允许我放入任何内容并且显示为灰色,我可以填充其他列ID A或ID BI可以添加值但是使用Xml它不会让我添加任何内容,甚至& #34; <element>
&#34; ?
创建这样的表,
USE [DBNAME]
GO
DROP TABLE [dbo].[TableName]
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[TableName](
[Id] [int] IDENTITY(1,1) NOT NULL,
[ID_A] [int] NULL,
[ID_B] [int] NULL,
[Xml] [xml] NULL,
CONSTRAINT [PK_TableName] PRIMARY KEY CLUSTERED
(
[Id] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, FILLFACTOR = 80) ON [PRIMARY],
CONSTRAINT [IX_TableName] UNIQUE NONCLUSTERED
(
[ID_A] ASC,
[ID_B] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, FILLFACTOR = 80) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO