當試圖從NVARCHAR(最大值)更改列VARCHAR(最大值)我收到提示:更改NVARCHAR到VARCHAR列數據類型
Cannot create a row of size 8063 which is greater than the allowable maximum row size of 8060.
這是因爲存儲Unicode字符需要不同的存儲正確。但是有沒有辦法強制SQL Server進行這種轉換?
編輯:表定義和修改命令:
CREATE TABLE [Descriptions](
[SerialNo] [varchar](20) NOT NULL,
[LanguageCode] [char](2) NOT NULL,
[Note] [nvarchar](max) NOT NULL,
[Address] [varchar](2000) NOT NULL,
[StoreId] [varchar](3) NULL,
CONSTRAINT [UK_Descriptions] UNIQUE NONCLUSTERED
(
[SerialNo] ASC,
[LanguageCode] ASC,
[StoreId] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO
-- Alter column:
ALTER TABLE [Descriptions] ALTER COLUMN [Note] varchar(max) NOT null;
'nvarchar(max)'和'varchar(max)'可以存儲在頁外,所以它們只貢獻一個指向行大小限制的指針。這裏肯定還有別的事情發生,你可以發佈表格定義嗎? – Andomar 2014-08-28 09:55:12
[SQL Server 2012中的最大行大小與varchar(max)字段]的可能重複(http://stackoverflow.com/questions/19251004/max-row-size-in-sql-server-2012-with-varcharmax-字段) – Tanner 2014-08-28 10:00:59
或:http://stackoverflow.com/questions/3905934 – Tanner 2014-08-28 10:02:25