nvarchar

  • From my understanding nvarchar allows you to store more than one language compared to varchar. Does nvarchar only take up more space if more than one language is stored or does it reserve the extra space regardless?

  • sstacy7 (3/24/2013)


    From my understanding nvarchar allows you to store more than one language compared to varchar. Does nvarchar only take up more space if more than one language is stored or does it reserve the extra space regardless?

    NVARCHAR takes 2 bytes per character no matter what language you use. In other words, yes... it always takes twice the space that VARCHAR does.

    To add to that, using NVARCHAR to store numeric only data such as SSN's is a real waste of space.

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

  • thank you 😀

  • sstacy7 (3/24/2013)


    thank you 😀

    You bet. Thank you for the feedback.

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

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

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