I'm going to save tutorials and snippets. How big should I declare the column?
views:
23answers:
3
+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
2010-08-26 13:53:34
You changed your answer after I mentioned the non-unicode :P
Chris Laythorpe
2010-08-26 13:58:52
@Chris Laythorpe: sorry, I was editing answer as you posted.
Mitch Wheat
2010-08-26 14:14:48
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
2010-08-26 13:54:23
+1
A:
varchar(max)
or nvarchar(max)
[TEXT(MAX)
or NTEXT(MAX)
are being deprecated in future versions.]
Chris Laythorpe
2010-08-26 13:54:41
...as a follow-up; if you are storing any ligatures or non-unicode text, use nvarchar(max).
Chris Laythorpe
2010-08-26 13:55:31