问题
why XML column doesn't let me put anything in it and greyed out, I can populate other columns ID A or ID B I can add values but with Xml it doesn't let me add anything, even "<element>" ?
Creating a table like this,
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
来源:https://stackoverflow.com/questions/25032601/why-xml-column-is-greyed-out