varchar versus nvarchar

  • Carla Wilson-484785 (12/2/2008)


    AND not too long ago, there was a forum post about trailing blanks in nvarchar, and how that can be a problem in comparisons, etc. unless you use RTRIM().

    Belated response:

    If the ANSI_PADDING option is set ON varchar has exactly the same trailing blanks issues as nvarchar; and the ability to set it OFF will be removed from SQL Server very soon (MS advice has for years been to keep it on at all times; setting it OFF creates big problems for indexed views and for table indexes involving computed columns, amongst other little problems) so those trailing blank issues should not be a factor in deciding between nvarchar and varchar - if you use varchar to avoid the trailing blanks issue your code will stop working in a new SQL Server release sometime soon.

    BTW, what on earth is this topic doing in the relational theory forum? I don't see the connection. :unsure:

    Tom

  • Ninja's_RGR'us (12/4/2008)


    JohnG (12/4/2008)


    Note that even in America, extended ASCII is very common. Just think of all of peoples names that have accents in them. Or the word resumé. Let alone, there is this province in Canada that has French as the standard language.

    So if you are designing a new system, use NCHAR and NVARCHAR. Trust me and you'll thank me later.

    I'm from Quebec... and varchar is more than enough to cover all our words!!!

    Same. Quebec Power!

Viewing 2 posts - 16 through 16 (of 16 total)

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