what does it means if the length is -1 ?
here is my tbl structure
Name nvarchar no -1
As JNK pointed out in the comments, it means MAX
:
Name NVARCHAR(MAX)
From MSDN:
-1 = Column data type is varchar(max), nvarchar(max), varbinary(max), or xml.
-1
in sys.columns
indicates (max)
.
I confirmed this by making a test table and querying sys.columns
:
CREATE TABLE dbo.t (testcol nvarchar(max))
select *
from sys.columns WHERE object_id = object_id('dbo.t')
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With