x

CREATE TABLE Limits

What is the largest row size I can create in a table? How many columns or bytes can it contain?

more ▼

asked Oct 16 '09 at 08:46 PM in Default

Steve Jones - Editor gravatar image

Steve Jones - Editor ♦♦
5.1k 76 79 82

(comments are locked)
10|1200 characters needed characters left

2 answers: sort voted first

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.

more ▼

answered Oct 16 '09 at 09:11 PM

Matt Whitfield gravatar image

Matt Whitfield ♦♦
29.4k 61 65 87

(comments are locked)
10|1200 characters needed characters left
Your answer
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

New code box

There's a new way to format code on the site - the red speech bubble logo will automatically format T-SQL for you. The original code box is still there for XML, etc. More details here.

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

SQL Server Central

Need long-form SQL discussion? SQLserverCentral.com is the place.

Topics:

x107
x31

asked: Oct 16 '09 at 08:46 PM

Seen: 1314 times

Last Updated: Oct 16 '09 at 08:46 PM