What is the largest row size I can create in a table? How many columns or bytes can it contain?
asked Oct 16, 2009 at 08:46 PM in Default
Steve Jones - Editor ♦♦
Now that is a question.
The maximum size is 8,060 bytes - but - in SQL Server 2008 varchar, nvarchar, varbinary, sql_variant and CLR user-defined type data can go into the 'row overflow' (see this link). That link also describes how large value (MAX), xml or blob (Binary Large OBject) data does not form part of that 8,060 bytes (except for a pointer to the data - usually 16-24 bytes - depending on edition).
There is also a limit of 8,018 bytes for rows in tables using SPARSE columns.
Edit -> sorry missed the bit about maximum number of columns. Details on most of the limits of SQL Server can be found here.