Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Survey:For Char Columns, Do You Use nvarchar or varchar Data Type? 1

Status
Not open for further replies.

JohnBates

MIS
Feb 27, 2000
1,995
US
Hi DBAs and others,

I'm redesigning a table that has many nvarchar columns... I think someone just left them as nvarchar because that's what they were after upsizing an Access database.

Does a nvarchar (60) col actually use 120 characters for storage?

Have you found any differences in performance between varchar vs. nvarchar?

Which data type do you normally use?

We are a US company.

Thanks for any advice. John


 
>> Does a nvarchar (60) col actually use 120 characters for storage?
It uses 2 byte per char so a max of 120 bytes. Will only store the data entered though - it doesn't pad.

>> Have you found any differences in performance between varchar vs. nvarchar?
Probably not enough to be important. More important is the wasted space and you might go over the max rowsize. Also some apps don't deal with unicode.

>> Which data type do you normally use?
Whatever is correct for the requirement. Usually varchar - in English only systems nvarchars are rarely needed,


======================================
Cursors are useful if you don't know sql.
DTS can be used in a similar way.
Beer is not cold and it isn't fizzy.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top