Avatar of crazywolf2010
crazywolf2010
Flag for United Kingdom of Great Britain and Northern Ireland asked on

SQL Server 2008 : Store 100K char string with indexing option

Hi,
How can I store a char string upto 100K within a column? I could use text else ntext but will normal indexing work with it?

Thanks
Microsoft SQL Server 2005Microsoft SQL Server 2008

Avatar of undefined
Last Comment
Rich Weissler

8/22/2022 - Mon
Rich Weissler

You might want to use varchar(max) or nvarchar(max) to store the character string rather than text or ntext.  (TEXT and NTEXT are deprecated, and will likely disappear from a future version of SQL.)

I don't believe you can use a standard index on [n]varchar(max), but you CAN use Full Text Indexes.
crazywolf2010

ASKER
Hi Razmus,
Do you have any example on full text indexes on such column which may contain upto 100K char data?
What are the pros and cons of this method?
Is this the only way?

Thanks
SOLUTION
Rich Weissler

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question
crazywolf2010

ASKER
Thanks for the details.

Are you asking for online examples to get started;
-- Yeap
All of life is about relationships, and EE has made a viirtual community a real community. It lifts everyone's boat
William Peck
ASKER CERTIFIED SOLUTION
Log in to continue reading
Log In
Sign up - Free for 7 days
Get an unlimited membership to EE for less than $4 a week.
Unlimited question asking, solutions, articles and more.