Same:
1.store unicode charactor.
2. A charactor is stroed with 2 bytes.
Different.
1. nchar 会自动填充数据到定义的固定长度;nvarchar 是数据有多长就存多少数据。
Example:
Create a table like below and store "A" in the two column.
CREATE TABLE [dbo].[AAAAA](
[name] [nchar](10) NULL,
[newName] [nvarchar](10) NULL
) ON [PRIMARY]
Result:the data length of the name is 20 bytes.
the data length of the newname is 2 bytes.
You can get the data length with the below method.
select datalength(name) as Bytes, * from [dbo].[AAAAA]
select datalength(newName) as Bytes, * from [dbo].[AAAAA]