Click here to Skip to main content
15,891,372 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
declare @text nvarchar(max) ='सम्पति'
select @text


the output is
??????


What I have tried:

How to see exact text typed.
Posted
Updated 3-Sep-17 20:51pm

1 solution

That's because although @text is NVARCHAR, the string 'सम्पति' isn't - its VARCHAR.
Try this:
SQL
declare @text nvarchar(max) =N'सम्पति'
select @text
The "N" prefix tells SQL it's a NVARCHAR constant.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900