tags:

views:

23

answers:

3

I'm going to save tutorials and snippets. How big should I declare the column?

+2  A: 

Declare as varchar(max) (if the size will exceed 8,000 bytes). (or nvarchar(max) if supporting multi-byte character sets)

Mitch Wheat
You changed your answer after I mentioned the non-unicode :P
Chris Laythorpe
@Chris Laythorpe: sorry, I was editing answer as you posted.
Mitch Wheat
A: 

If you mean what datatype, probably you need nvarchar(max). If you are still on SQL Server 200 you need ntext or text.

HLGEM
+1  A: 

varchar(max) or nvarchar(max)

[TEXT(MAX) or NTEXT(MAX) are being deprecated in future versions.]

Chris Laythorpe
these are being deprecated in next version...
Mitch Wheat
...as a follow-up; if you are storing any ligatures or non-unicode text, use nvarchar(max).
Chris Laythorpe
...on Mitch's advice, varchar(max) or nvarchar(max).
Chris Laythorpe
edited. +1......
Mitch Wheat