sql server 2005 coding errors
-
Thursday, May 10, 2012 9:21 AM
I have a Special symbol "®", I can't Save it in database.
In database "®" is show "?".
Thanks.
- Moved by Sheng Jiang 蒋晟MVP Thursday, May 10, 2012 8:01 PM English (From:一般性问题讨论区)
All Replies
-
Thursday, May 10, 2012 8:13 PM
I think you need nvarchar datatype
I have tried the following and it is work.
create table #test
(
name nvarchar(10)
)insert into #test values ('®')
select * from #test
- Proposed As Answer by Naomi NMicrosoft Community Contributor, Moderator Thursday, May 10, 2012 8:14 PM
- Unproposed As Answer by Naomi NMicrosoft Community Contributor, Moderator Thursday, May 10, 2012 8:14 PM
-
Thursday, May 10, 2012 8:16 PMModerator
This is correct with the minor correction (although your code works as is) - you need to add N' prefix to indicate you're using unicode, e.g.
DECLARE @test TABLE (NAME NVARCHAR(10)) INSERT INTO @test VALUES (N'�') SELECT * FROM @test
For every expert, there is an equal and opposite expert. - Becker's Law
My blog- Proposed As Answer by Eshani Rao Friday, May 11, 2012 1:20 AM
- Marked As Answer by Iric WenModerator Friday, May 18, 2012 9:06 AM

