HTML Symbols are being displayed as a question mark in SQL Server Database

后端 未结 3 1014
一个人的身影
一个人的身影 2021-01-12 06:00

Today i noticed that html symbols such as: ★ are being displayed in my database as a question mark.

I\'m using varchar as type and the database i am using is micros

3条回答
  •  长发绾君心
    2021-01-12 06:25

    insert into tablename values (N'★ ') 
    

    above is the syntax for inserting and make sure your field data type is nvarchar or try this test example

    create table test (abc nvarchar)
    insert into test values (N'★ ')
     select * from test
    

提交回复
热议问题