在SQL Server中插入阿拉伯语单词的问题 [英] Problem to insert arabic words in SQL server

查看:74
本文介绍了在SQL Server中插入阿拉伯语单词的问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在sql server 2008中插入阿拉伯文本作为sql变量的问题插入像这个值的数据???? 。如何解决这个问题?



这是我的疑问



插入测试值(N'' + @姓名)



我尝试了什么:



我试过在查询中添加N'个不同的类型。但是我无法解决这个问题。

problem to insert arabic text as sql variable in sql server 2008 inserts data like this value ???? .How to solve this?

This is my query

insert into tests values(N''+@name)

What I have tried:

I tried to add N' different types in the query.But I can't solve this.

推荐答案

N 前缀仅适用于实际字符串而不是它的副本,因此:

The N prefix only works on the actual string not a copy of it so:
declare @name nvarchar(50);
set @name = N'محسن';
insert into tests values(@name)


使用此链接解决问题 http://www.serverintellect.com/support/sqlserver/change-database-collat​​ion [ ^ ]由Mehdi Gholam建议
Issue solved using this link http://www.serverintellect.com/support/sqlserver/change-database-collation [^] suggested by Mehdi Gholam


这篇关于在SQL Server中插入阿拉伯语单词的问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆