Converting all occurences of nvarchar to varchar

  • My database has a lot of columns defined as nvarchar and I want to convert them to varchar since there is no need for uni-code in my db.There are a lot of function ,procedures that use these columns too.Is there an easy way to convert all these nvarchar datypes to varchar ?

    thanks in advance.

  • if you Just change the datatypes in the database tables.. everything should work.. if you have specifically specified any convert to nvarchar etc.. you will have to change your declares in the sps and functions... else if you are just calling the columns and not doing any conversions.. you should be good by just changing the column datatypes....

    varchar will be faster than nvarchar.. but further, if you can reduce their sizes from default varchaR(50) to a specific length as required by the data, you will see improvement in your queries as well....

  • Mani Singh (6/26/2009)


    if varchar will be faster than nvarchar.. but further, if you can reduce their sizes from default varchaR(50) to a specific length as required by the data, you will see improvement in your queries as well....

    Mani, can you elaborate on this? Not doubting you by any means, but simply I've never heard of this. Being that the storage size is the actual length of data entered + 2 bytes, I don't see how lowering the length of the data type would increase performance.

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

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