Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Max chars in a varchar field?

Author  Topic 

phrankbooth
Posting Yak Master

162 Posts

Posted - 2007-02-01 : 17:45:31
What's the maximum number of characters that varchar field will take? I read somewhere that it's 8k, but I may have misunderstood.

I have to potentially store 100k+ chars in a field.

What's the best way to do this?

Thanks,
--PhB

--PhB

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2007-02-01 : 18:11:14
For SQL Server 2005, you can use varchar(max)/nvarchar(max). For SQL Server 2000, you would need to use text/ntext.

2005:
http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=78395

2000:
Yes it's 8000.

Tara Kizer
Go to Top of Page
   

- Advertisement -