SQL Varchar(max)

  • Hi Team,

    In sql server 2008R2, what is the max characters for Varchar(max).

    i've declared a variable in a stored proc as Temp Varchar(max), but am passing a parameter with 95000 characters,

    is it Work..?

    Please Suggest...

  • 2^31-1 bytes.

    Maximum Capacity Specifications for SQL Server

    Need an answer? No, you need a question
    My blog at https://sqlkover.com.
    MCSE Business Intelligence - Microsoft Data Platform MVP

  • the limit's found in BOL, but its basically

    select POWER(convert(bigint,2),31) -1

    so a Varchar(max) stores a maximum of 2 147 483 647 characters.

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • you would google it out faster than post this question!

    http://msdn.microsoft.com/en-us/library/ms176089.aspx

    It's 2^31-1 bytes (2 GB).

    _____________________________________________
    "The only true wisdom is in knowing you know nothing"
    "O skol'ko nam otkrytiy chudnyh prevnosit microsofta duh!":-D
    (So many miracle inventions provided by MS to us...)

    How to post your question to get the best and quick help[/url]

  • Oops!

    Somehow, I only could see other replies after I've posted my one.

    _____________________________________________
    "The only true wisdom is in knowing you know nothing"
    "O skol'ko nam otkrytiy chudnyh prevnosit microsofta duh!":-D
    (So many miracle inventions provided by MS to us...)

    How to post your question to get the best and quick help[/url]

Viewing 5 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic. Login to reply