Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I recently discovered that MS-SQL Server 2008 imposes an upper limit of 8000 bytes for a column (for character data).
I need to store data that occusionally could surpass this limit.
Is there a way to do this?
The data are character strings.


share|improve this question
up vote 2 down vote accepted

Use varchar(max) or nvarchar(max). These have a storage limit of 2^31-1 bytes.

share|improve this answer
@squillman:But here does not make such a distinction. – user76678 May 23 '11 at 19:58
@user76678 Yes it does. On that page see the lines that say Bytes per varchar(max), varbinary(max), xml, text, or image column and Characters per ntext or nvarchar(max) column under Database Engine objects. – squillman May 23 '11 at 20:03
@squillman:May be it is my missunderstanding;what is the difference with Bytes per short string column? – user76678 May 23 '11 at 20:04
@user76678 Also, are you using SQL Server 2008 or SQL Server 2008 R2? Whereas this particular item is not different between the two, they are different versions. – squillman May 23 '11 at 20:05
@user76678 Bytes per short string is for the non max flavor of varchar and nvarchar. That is, (n)varchar can go up to 8000 characters (ie- varchar(8000) / nvarchar(8000)) When you use (n)varchar(max) that changes the game. – squillman May 23 '11 at 20:12

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.