OT: varchar Vs nVarchar datatypes?

OT: varchar Vs nVarchar datatypes?

Old forum URL: forums.lhotka.net/forums/t/8743.aspx


Jav posted on Tuesday, March 30, 2010

Three (OT - sorry) questions:

1. If the database will be used to store only English (US or otherwise), is there any point in using nvarchar and nchar datatypes instead of varchar and char?

2. Using nvarchar and nchar datatypes will use double the storage space as compared to varchar and char. Correct?

3. Would the server collation setting have an impact on storage size if using nvarchar and nchar - in other words, would it revert to using one byte per character if collation indicates use of English only?

Thanks

Jav

tmg4340 replied on Tuesday, March 30, 2010

The way I understand it (assuming you're talking about SQL Server):

1. No.

2. Yes.

3. No.

Mind you, this is SQL Server 2005 understanding - I don't know if things have changed in 2008.  I don't think they have, but I haven't had the time (or need) to look into it.

If these are Oracle questions, then you can probably disregard this - my Oracle experience is pretty limited.

HTH

- Scott

Jav replied on Tuesday, March 30, 2010

Thank you Scott.  That's what my guess was.  And yes, the question was about SqlServer.  I don't know much about Oracle either.

Jav

Copyright (c) Marimer LLC