Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
shapper
Constraint Violating Yak Guru
450 Posts |
Posted - 2007-01-31 : 19:31:53
|
| Hello,What is the maximum lenght when using nvarchar(MAX)?If I want to save a really long text, should be this the data type to use?I am using SQL 2005.Thanks,Miguel |
|
|
rrb
SQLTeam Poet Laureate
1479 Posts |
Posted - 2007-01-31 : 19:49:28
|
| Hi MiguelIn SQL Server 2000 the max on nvarchar is 4000 and varchar is 8000. I assume it'll be the same in 2005.You should probably be using a text column if you're anywhere close to that limit.Check Data Types in Books On Line.--I hope that when I die someone will say of me "That guy sure owed me a lot of money" |
 |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
Posted - 2007-01-31 : 19:54:05
|
rrb, nvarchar(max) and varchar(max) is new to 2005.shapper, according to 2005 Books Online:For nvarchar:quote: max indicates that the maximum storage size is 2^31-1 bytes. The storage size, in bytes, is two times the number of characters entered + 2 bytes.
For varchar:quote: max indicates that the maximum storage size is 2^31-1 bytes. The storage size is the actual length of data entered + 2 bytes.
Tara Kizer |
 |
|
|
|
|
|