Longest string in SQL 2005

Posted on 2007-10-08
Last Modified: 2009-07-29
With the advent of VARCHAR(MAX) in 2005, is it possible to have a T-SQL variable longer than 8000 bytes?  I tried to do so and it still tops out at 8000 bytes.
Question by:dpbouchard
    LVL 75

    Accepted Solution

    yes, You can have store upto 2Gb on varchar(max) datatypes
    If you are getting only 8000 characters, make sure that the database compatability level is 90
    LVL 142

    Expert Comment

    by:Guy Hengel [angelIII / a3]
    > I tried to do so and it still tops out at 8000 bytes.
    apart from aeeshattingals' good comment:
    how do you see/notice that "limit" ?

    Featured Post

    Highfive Gives IT Their Time Back

    Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

    Join & Write a Comment

    I am showing a way to read/import the excel data in table using SQL server 2005... Suppose there is an Excel file "Book1" at location "C:\temp" with column "First Name" and "Last Name". Now to import this Excel data into the table, we will use…
    Introduction This article will provide a solution for an error that might occur installing a new SQL 2005 64-bit cluster. This article will assume that you are fully prepared to complete the installation and describes the error as it occurred durin…
    Need more eyes on your posted question? Go ahead and follow the quick steps in this video to learn how to Request Attention to your question. *Log into your Experts Exchange account *Find the question you want to Request Attention for *Go to the e…
    Internet Business Fax to Email Made Easy - With eFax Corporate (, you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…

    754 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    24 Experts available now in Live!

    Get 1:1 Help Now