-1

You can I display special Unicode characters in my result set on my SQL Server?

e.g. How can i display those characters ☺♦♦?

Ionic
  • 3,884
  • 1
  • 12
  • 33
  • 1
    Please be a bit more specific. I tried to provide you an answer, but I'm not sure if it's that what you mean. – Ionic Jun 19 '15 at 13:56

1 Answers1

6

Well due to the fact that your question is very unspecific here are some solutions.

You need to specify a string as unicode string. This can be achieved by adding an N in front of the string. See example:

SELECT N'☺♦♦' as a, '☺♦♦' as b

Result:

a    b
---- ----
☺♦♦  ???

If you want to store those symbols, you need a type as nvarchar or nchar.

Hopefully this helps you.

Ionic
  • 3,884
  • 1
  • 12
  • 33
  • No problemo. Nice that it helped you. – Ionic Jun 19 '15 at 14:07
  • @MaheshwaranRagunathan: if this answer helped you solve your problem, then please [**accept this answer**](http://meta.stackoverflow.com/q/5234/153998). This will show your appreciation for the people who *spent their own time to help you*. – marc_s Jun 19 '15 at 15:41