Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

NVARCHAR column with a negative maximum length?

522 views
Skip to first unread message

Don

unread,
Aug 9, 2008, 7:01:18 PM8/9/08
to
I recently created a development copy of a SQL Server 2005 database
from a client's backup, and while examining the structure I found
several tables with NVARCHAR columns with -1 as the maximum number of
characters. In all cases the columns are defined as NOT NULL, but with
no default value. When I query those columns, the value is always a
null string, but not NULL. I cannot find any reference to this in any
of my books, and when I try Googling the quoted string "NVARCHAR(-1)"
all it turns up are resources with the string "NVARCHAR(1)". I'm
stumped. What can this possibly mean?

Tom Cooper

unread,
Aug 9, 2008, 11:27:44 PM8/9/08
to
Those columns have been declared as nvarchar(max).

Tom

"Don" <don...@gmail.com> wrote in message
news:307fdbad-6c35-4505...@y21g2000hsf.googlegroups.com...

0 new messages