Home > Backend Development > PHP Tutorial > sql server2005添加中文有关问题

sql server2005添加中文有关问题

WBOY
Release: 2016-06-13 10:16:13
Original
798 people have browsed it

sql server2005添加中文问题
表t中 a 字段 nchar(10) 使用insert语句插入英文没有问题,插入中文后,搜索出来的结果 该列显示为?? ,这是为什么啊 ?不支持中文么?

------解决方案--------------------
更改一下数据库的排序规则试试
------解决方案--------------------
create table tb(a nchar(10))
insert into tb values(N'中国')
insert into tb values(N'中国人民解放军')
insert into tb values(N'中国人民解放军驻香港')

------解决方案--------------------
N‘中文’

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template