Text data type in ms sql server
visual studio 2005
what is the differences between text, varchar and nvarchar data types in ms sql server? when and when not to use them?
1 Answer
Know the answer? Post it. Somebody with the same question will find it here.

Simon66 reputationPosted Apr 7, 2007, 5:07 AM EDT
Hi, The text data type is used for really long strings (up to 2^31-1 characters). On the other side, varchar and char datatypes are used for shorter strings with which you specify the maximum length. Char automatically allocates for every row the maximum length you set in field definition while Varchar has the advantage of allocating only space for the text you insert into your field. Finally, ntext is the equivalent of text but stands for Unicode Characters (n stands for National, so National Text in this case). Similarly, nvarchar is for Unicode variable character length and nchar is for Unicode fixed character length. You can find further information about Transact-SQL there : http://msdn2.microsoft.com/en-us/library/ms189826.aspx Hope this helps! Simon