Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I am adding a field to a SQL Server 2008 database. The field needs to accomodate up to 8000 characters (occasionally Unicode chars as well). Seems from my research that text data type is being deprecated. Go with nvarchar or stick with text anyway for such a large field?

share|improve this question

3 Answers 3

For up to 8000 with unicode, you can only use nvarchar(max)

The limit for nvarchar is 4000 without using a LOB data types (max, that is)

"text" is deprecated (and frankly rubbish compared to max types)

share|improve this answer

My recommendation on new design is never to use features that are being deprecated without a good reason. If it's possible that this application will survive to see a newer version of SQL Server then I wouldn't do it. I'd use NVARCHAR(MAX).

share|improve this answer
    
you mean nvarchar(4000) or varchar(8000) ? –  gbn Apr 12 '10 at 16:16
    
@gbn: Oh geez, yes. Thanks! I meant (max). Edited to change. –  squillman Apr 12 '10 at 16:34

There is always nvarchar(max) which is the replacement for ntext.

See http://msdn.microsoft.com/en-us/library/ms178158.aspx

(Also supported in SQL Sever 2005.)

share|improve this answer

Your Answer

 
discard

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.