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
 Can varchar length be set to more than 8000 char?

Author  Topic 

aex
Yak Posting Veteran

60 Posts

Posted - 2006-05-22 : 02:21:25
Hi, everyone, I want to know is there a way for me to set varchar to store more than 8000 characters? (I did checked from sql server books online and i know that the maximum storage for varchar, but i just want to know is there any exceptional way for me to store more than that).

Thanks for any reply.

aex

chiragkhabaria
Master Smack Fu Yak Hacker

1907 Posts

Posted - 2006-05-22 : 02:36:37
Read on Text Datatype.

If Debugging is the process of removing Bugs then i Guess programming should be process of Adding them.
Go to Top of Page

eyechart
Master Smack Fu Yak Hacker

3575 Posts

Posted - 2006-05-22 : 02:44:05
not for SQL 2000 or lower. For SQL 2005 there is varchar(max).


-ec
Go to Top of Page

PSamsig
Constraint Violating Yak Guru

384 Posts

Posted - 2006-05-22 : 02:54:39
In pre-2005 you have the choice of text and in 2005 you can use varchar(MAX). They both get stored like a BLOB, but text filds has limited use in builtin functions like REPLACE(), CHARINDEX() and SUBSTRING(). The size limit for both is 2GB.

-- This one's tricky. You have to use calculus and imaginary numbers for this. You know, eleventeen, thirty-twelve and all those.
Go to Top of Page

aex
Yak Posting Veteran

60 Posts

Posted - 2006-05-22 : 02:56:38
Thanks a alot everyone. ya, to set more than 8000 characters, i have to use varchar(max). thanks again guys!

aex
Go to Top of Page
   

- Advertisement -