Data Type Char. Limitations????

As far as I "know" an nvarchar is the MAX character holder in SQL.  Am I correct?  With a max lengh of 4000 char.  I have a project going on, where a majority of the time, the values will not exceed 4000, however, in beta testing for over 2 weeks with the end users, I finally had a dump into SQL exceeding 4000.  Is there any other Data Type that will allow SQL to exceed 4000 char, so I don't run into this down the road?
LVL 2
chrisryhalAsked:
Who is Participating?
 
arbertCommented:
Varchar(8000)

Do you actually need an nvarchar?

You can also use a text datatype, but performing updates can get a little complex later.
0
 
Anthony PerkinsCommented:
varchar (or char) have a maximum of 8000 characters.  You only need nvarchar (or nchar) if youa re using unicode (double-byte) characters.

text data types have a maximum of 2GB, but have limitations as to the functions and SQL clauses you can use.
0
 
chrisryhalAuthor Commented:
As per your postings, you both posted within (1) min of one another, so I will split the points.  I was unaware that those other datatypes offered a longer character limit.  8000 would definitly be enough.

Thanks for the advice.
CR
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.