| Author: nikunj goswami 18 Mar 2008 | Member Level: Silver | Rating: Points: 2 |
"nvarchar" can store unicode characters.
the maximum size of "nvarchar" is 4000 characters, where as it's 8000 characters for "varchar"
Thanks from :- http://allaboutaspdotnet.page.tl/SQLServer-with--.-Net.htm
|
| Author: Kalyan 18 Mar 2008 | Member Level: Gold | Rating: Points: 2 |
nvarchar takes -Unicode data.
Varchar takes-ASCII data.
You can store image file name in varchar datatype. and to store image make a folder within your project file and store the images using server.mappath() and uploaded.saveas() method.
|
| Author: MuniHemadriBabu.Jogi 18 Mar 2008 | Member Level: Gold | Rating: Points: 2 |
SQL Server provides both datatypes to store character information. For the most part the two datatypes are identical in how you would work with them within SQL Server or from an application. The difference is that nvarchar is used to store unicode data, which is used to store multilingual data in your database tables. Other languages have an extended set of character codes that need to be saved and this datatype allows for this extension. If your database will not be storing multilingual data you should use the varchar datatype instead.
|
| Author: vinoth kumar 18 Mar 2008 | Member Level: Silver | Rating: Points: 2 |
the main difference between the two is by using nvarchar we can reuse the space..
it means suppose if you use nvarchar(20). but you need only 10 char. then the remining 10 char will remains waste in varchar. but if you use nvarchar you can overcome from this drawback.
|
| Author: Balthazor 18 Mar 2008 | Member Level: Diamond | Rating: Points: 2 |
nvarchar takes -Unicode data.
Varchar takes-ASCII data.
|
| Author: UltimateRengan 30 Jul 2008 | Member Level: Diamond | Rating: Points: 1 |
The broad range of data types in SQL Server can sometimes throw people through a loop, especially when the data types seem to be highly interchangeable. Two in particular that constantly spark questions are VARCHAR and NVARCHAR: what's the difference between the two, and how important is the difference?
VARCHAR is an abbreviation for variable-length character string. It's a string of text characters that can be as large as the page size for the database table holding the column in question. The size for a table page is 8,196 bytes, and no one row in a table can be more than 8,060 characters. This in turn limits the maximum size of a VARCHAR to 8,000 bytes.
The "N" in NVARCHAR means uNicode. Essentially, NVARCHAR is nothing more than a VARCHAR that supports two-byte characters. The most common use for this sort of thing is to store character data that is a mixture of English and non-English symbols — in my case, English and Japanese.
One fairly major change to both VARCHAR and NVARCHAR in SQL Server 2005 is the creation of the VARCHAR(MAX) and NVARCHAR(MAX) data types. If you create a VARCHAR(MAX) column, it can hold up to 2^31 bytes of data, or 2,147,483,648 characters; NVARCHAR(MAX) can hold 2^30 bytes, or 1,073,741,823 characters.
These new data types are essentially replacements for the Large Object or LOB data types such as TEXT and NTEXT, which have a lot of restrictions. They can't be passed as variables in a stored procedure, for instance. The (MAX) types don't have those restrictions; they just work like very large string types. Consequently, if you're in the process of re-engineering an existing data design for SQL Server 2005, it might make sense to migrate some (although not all!) TEXT / NTEXT fields to VARCHAR(MAX) / NVARCHAR(MAX) types when appropriate.
The big difference between VARCHAR and NVARCHAR is a matter of need. If you need Unicode support for a given data type, either now or soon enough, go with NVARCHAR. If you're sticking with 8-bit data for design or storage reasons, go with VARCHAR. Note that you can always migrate from VARCHAR to NVARCHAR at the cost of some room -- but you can't go the other way 'round. Also, because NVARCHAR involves fetching that much more data, it may prove to be slower depending on how many table pages must be retrieved for any given operation
refer:- http://searchsqlserver.techtarget.com/tip/0,289483,sid87_gci1266201,00.html
|