Reputation: 1331
My SQL Server changes same characters in the Strings.
Example:
insert into TEST_TABLE
values ('árvíztűrő tükörfúrógép2');
inserts
árvízturo tükörfúrógép
The TEST_TABLE
has only one column with type varchar(50)
.
How can I insert strings into a table in SQL Server?
Upvotes: 1
Views: 295
Reputation: 1169
Run the following code on your table:
ALTER TABLE TEST_TABLE ALTER COLUMN *ColumnName* nvarchar(50)
After that, it works like a charm (even without prefixing the inserting string with N).
Upvotes: 1
Reputation: 2516
You will most likely need an nvarchar
(rather than varchar
) data type on the column that allows unicode characters.
You will probably need to specify it being unicode too by prefixing the value with an "N".
insert into TEST_TABLE
values (N'árvíztűrő tükörfúrógép2');
Upvotes: 4
Reputation: 6193
Change the column datatype
to nvarchar
and try this:
insert into TEST_TABLE
values (N'árvíztűrő tükörfúrógép2');
Upvotes: 1