VarChar(max)?!?

  • A real good explanation by Simon....Im quiet clear on this one..Thanks Simon:)

  • --Step 1

    Declare @STR VarChar(max);

    Set @STR=Replicate(cast('*'as varchar(MAX)) ,10000)

    Print Len(@Str);

    --Step 2

    Declare @STR VarChar(max);

    Set @STR=Replicate('*' ,10000)

    Print Len(@Str);

    ----

    i m hardly got the difference between step 1 and step 2 ..please explain both ????

    -------Bhuvnesh----------
    I work only to learn Sql Server...though my company pays me for getting their stuff done;-)

  • nice to have a clear explanation.

    Good question

    Jason...AKA CirqueDeSQLeil
    _______________________________________________
    I have given a name to my pain...MCM SQL Server, MVP
    SQL RNNR
    Posting Performance Based Questions - Gail Shaw[/url]
    Learn Extended Events

Viewing 3 posts - 16 through 17 (of 17 total)

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