DATALENGTH

  • I have altered the explanation a bit to better show what the reason is for this.

    My apologies for this.

  • Steve Jones

    My apologies for this

    Sorry, in this case, I don't feel that the responsibility falls upon you to do the research for the correct answer. The answer provided sounded viable, which to the average user would be taken as gospel. If you look the top of the homepage states that there are 1.3 million users of this web site. Yet if you look at the numbers of comments, and who they are you repeatedly see the same few. When you look at the numbers of answerers, you see a disproportionate number of posters. So now one must ask - How many of the people who answered this question think that what they read is correct?

    This reminds me of an interview I took many years ago where my new boss was going to explain to me how indexes worked. I cringed and bit my lip when his explanation, based upon an article he had recently read in a particular magazine had the definitions for clustered vs nonclustered indexes reversed. For a long time he believed this because he read it.

    Steve Jimmo
    Sr DBA
    “If we ever forget that we are One Nation Under God, then we will be a Nation gone under." - Ronald Reagan

  • Thanks for the 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

  • I got the wright answer because I knew that a char(50) would return 50, so thanks for the easy choice 🙂

    My question now is: how someone know that "When omitting the size of either char or varchar, the default size is 30 for both" ? Where can I find this type of information because I looked on the help pages for "data type" and I found nothing about default size...

    Oups! ok.. Found it! I should have read the remark...

Viewing 4 posts - 16 through 18 (of 18 total)

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