Max Row Size in SQL Server 2012 with varchar(max) fields

前端 未结 3 625
离开以前
离开以前 2020-12-18 21:55

I have created a table with column types as nvarchar(max), which my understanding is that they can support 2GB. However on inserting, I still receive this error

3条回答
  •  鱼传尺愫
    2020-12-18 22:16

    From the SQL Server documentation:

    The length of individual columns must still fall within the limit of 8,000 bytes for varchar, nvarchar, varbinary, sql_variant, and CLR user-defined type columns. Only their combined lengths can exceed the 8,060-byte row limit of a table.

    The sum of other data type columns, including char and nchar data, must fall within the 8,060-byte row limit. Large object data is also exempt from the 8,060-byte row limit.

    More info here: https://technet.microsoft.com/en-us/library/ms186981%28v=sql.105%29.aspx

提交回复
热议问题