Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

SQL Varchar(max) Expand / Collapse
Author
Message
Posted Friday, July 5, 2013 6:36 AM
SSC Veteran

SSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC Veteran

Group: General Forum Members
Last Login: Tuesday, August 5, 2014 10:09 AM
Points: 227, Visits: 713
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...
Post #1470699
Posted Friday, July 5, 2013 6:47 AM


SSChampion

SSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampion

Group: General Forum Members
Last Login: Yesterday @ 3:48 PM
Points: 12,908, Visits: 32,005
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

--There is no spoon, and there's no default ORDER BY in sql server either.
Actually, Common Sense is so rare, it should be considered a Superpower. --my son
Post #1470706
Posted Friday, July 5, 2013 6:47 AM


SSChampion

SSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampion

Group: General Forum Members
Last Login: Today @ 5:24 AM
Points: 13,605, Visits: 10,481
2^31-1 bytes.

Maximum Capacity Specifications for SQL Server




How to post forum questions.
Need an answer? No, you need a question.
What’s the deal with Excel & SSIS?

Member of LinkedIn. My blog at LessThanDot.

MCSA SQL Server 2012 - MCSE Business Intelligence
Post #1470707
Posted Friday, July 5, 2013 6:48 AM
SSCrazy

SSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazy

Group: General Forum Members
Last Login: Yesterday @ 7:27 AM
Points: 2,836, Visits: 5,067
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!"
(So many miracle inventions provided by MS to us...)

How to post your question to get the best and quick help
Post #1470708
Posted Friday, July 5, 2013 6:49 AM
SSCrazy

SSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazy

Group: General Forum Members
Last Login: Yesterday @ 7:27 AM
Points: 2,836, Visits: 5,067
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!"
(So many miracle inventions provided by MS to us...)

How to post your question to get the best and quick help
Post #1470710
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse