Maximum row size in SQLServer
When I execute the command below
CREATE TABLE [CST_SAY3] (
[BAS_ID] [int],
[PRO_DETAIL] [Nvarchar] (4000) ,
[REMARK] [Nvarchar] (3000)
) ON [PRIMARY]
GO
It will make a warning
Warning: The table 'CST_SAY3' has been created
but its maximum row size (14029) exceeds the maximum number
of bytes per row (8060).
INSERT or UPDATE of a row in this table will fail if the
resulting row length exceeds 8060 bytes.
Although I know the reason (In Microsoft® SQL Server™, the maximum allowable size of a row in a table is 8060 bytes. A row cannot be split across data pages. A data page is 8 KB in size and consists of the data row and some internal data structures.) , I don't know why the maximum row size is
14029, a field is Nvarchar(4000), the bytes is 8000, another field is Nvarchar(3000), the bytes is 6000,
the last field is int , why it's bytes is 29?
Can someone give me the answer, thanks.
CREATE TABLE [CST_SAY3] (
[BAS_ID] [int],
[PRO_DETAIL] [Nvarchar] (4000) ,
[REMARK] [Nvarchar] (3000)
) ON [PRIMARY]
GO
It will make a warning
Warning: The table 'CST_SAY3' has been created
but its maximum row size (14029) exceeds the maximum number
of bytes per row (8060).
INSERT or UPDATE of a row in this table will fail if the
resulting row length exceeds 8060 bytes.
Although I know the reason (In Microsoft® SQL Server™, the maximum allowable size of a row in a table is 8060 bytes. A row cannot be split across data pages. A data page is 8 KB in size and consists of the data row and some internal data structures.) , I don't know why the maximum row size is
14029, a field is Nvarchar(4000), the bytes is 8000, another field is Nvarchar(3000), the bytes is 6000,
the last field is int , why it's bytes is 29?
Can someone give me the answer, thanks.