question

siugoalie78 avatar image
siugoalie78 asked

NVarchar and Sysname column

I just noticed in the sys.columns table for my database, every column I have that is an NVarchar data type also lists a corresponding column with a data type of Sysname. However, if I look at any of the tables where those columns exist, I only see the NVarchar, not the Sysname. Can someone please explain to me why the Sysname columns are listed, and what is their purpose?
columnnvarchar
1 comment
10 |1200 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Could this have to do with replication? I do not see these on my non-replicating database that otherwise has the same schema.
0 Likes 0 ·

1 Answer

· Write an Answer
Wilfred van Dijk avatar image
Wilfred van Dijk answered
sysname is an alias for "nvarchar(128) not null"
1 comment
10 |1200 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

I understand that, but sys.columns lists two columns. One as the nvarchar, and a second one as Sysname. My table only has one column. Why does sys.columns show two?
0 Likes 0 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.