Inserting special characters (greater/less than or equal symbol) into SQL Server database

user1610304 picture user1610304 · Aug 19, 2012 · Viewed 18.6k times · Source

I am trying to insert and into a symbol table where the column is of type nvarchar.

Is this possible or are these symbols not allowed in SQL Server?

Answer

Gonzalo.- picture Gonzalo.- · Aug 19, 2012

To make it work, prefix the string with N

create table symboltable 
(
  val nvarchar(10)
)

insert into symboltable values(N'≥') 

select *
from symboltable 

enter image description here

Further Reading: