I have the following table in SQL Server 2012, Web Edition:
CREATE TABLE [dbo].[MyTable]
(
[Id] INT IDENTITY (1, 1) NOT NULL,
[Created] DATETIME DEFAULT (getdate()) NOT NULL,
[RefId] INT NULL,
[Name] NVARCHAR (128) NULL,
[Email] NVARCHAR (128) NULL,
[ImageUrl] NVARCHAR (256) NULL,
[Url] VARCHAR (256) NULL,
[Age] TINYINT NULL,
[Country] VARCHAR (6) NULL,
[Location] NVARCHAR (192) NULL,
[People] INT NULL,
[Categories] NVARCHAR (128) NULL,
[Block] BIT DEFAULT ((0)) NOT NULL,
[GeneratedRevenue] INT NULL,
[IsFemale] BIT DEFAULT ((1)) NULL,
[HasInstalled] BIT NULL,
[Keywords] VARCHAR (128) NULL,
[Brands] NVARCHAR (512) NULL,
[Source] TINYINT NULL,
[Alias] VARCHAR (65) NULL,
PRIMARY KEY CLUSTERED ([Id] ASC)
);
As far as I gather, the total size should be 3175 bytes; but I regularly get the following error, when updating the table:
Cannot create a row of size 8068 which is greater than the allowable maximum row size of 8060.
How does the above result in a row size of 8068?
Edit: I should mention that this table has been altered, uses Change Tracking and has four indexes.
Also, if I copy the contents to a new table with the same definition, no errors occur for a while, but do come back.