Is there any way to store āre exactly in SQL server table.
I hardcoded the same value in varchar column. It is saving are. I wanted to store along with special symbols
Is there any way to store āre exactly in SQL server table.
I hardcoded the same value in varchar column. It is saving are. I wanted to store along with special symbols
Use Nvarchar - Nvarchar stores UNICODE data. If you have requirements to store UNICODE or multilingual data, Nvarchar is the choice. You need an N prefix when inserts data. Varchar stores ASCII data.
Refer below sample code
declare @data table
(field1 nvarchar(10))
insert into @data
values
(N'āre')
select * from @data
You need to declare your string assignment using the N prefix (the N stands for "National Character") as you need to explicitly say you are passing a string containing unicode characters here (or an nchar, ntext etc if you were using those).
NVarchar variable are denoted by N' so it would be
DECLARE @objname nvarchar(255)
set @objname=N'漢字'
select @objname
Now the output will be 漢字 as it has been set. Run above code.