You don't know that at all. At the lowest level, all data is stored as bytes because that's all a computer can store. The我知道nvarchar倾向于将数据存储为字节
nvarchar
data type is no different to any other in that regard. At a higher level though, nvarchar
data is stored as text, just like varchar
data is. In either case, you simply save or retrieve a String
in your .NET code and the database takes care of any encoding details based on the data type.嗨JMCIHINNEY每当我在SSMS写一下查询时,我倾向于看到法国人物的奇怪符号,如何看待实际符号。请注意,这不是.NET代码You don't know that at all. At the lowest level, all data is stored as bytes because that's all a computer can store. Thenvarchar
data type is no different to any other in that regard. At a higher level though,nvarchar
data is stored as text, just likevarchar
data is. In either case, you simply save or retrieve aString
in your .NET code and the database takes care of any encoding details based on the data type.
我正在使用Microsoft SQL Server 2019 - 15.0,SSMS 18.7.1和Latin1_General_Ci_As,但我尝试将其更改为如下所示的查询中的其他沟通我刚刚将法国文本从帖子复制到使用SSMS的表格中,我没有看到重音字符的问题。您使用的是,您使用的是什么版本的SQL Server和SSM,数据库的排序是什么?
select id, desc_info collate Latin1_General from metest